OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Advantages to breaking up style sheets?
This page's ID:
10990
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
OK I found it: This page: [code]html> <head> <title>Untitled</title> <link href="stylesheet.php?sheet=basic" rel="stylesheet" type="text/css"> <script language="Javascript" type="text/javascript"> <!-- function setStyle (sheetname) { var lnk = document.getElementsByTagName("LINK")[0]; lnk.href = "stylesheet.php?sheet=" + sheetname; } //--> </script> </head> <body onload="setStyle('basic')"> <p>Test text.</p> <a href="javascript:setStyle('basic')">Basic</a><br /> <a href="javascript:setStyle('exotic')">Exotic</a> </body> </html>[/code] calls this stylesheet: [code]<?php header("Content-Type: text/css"); switch ($sheet) { case "basic": $bg_color = "000000"; $color = "FFFFFF"; break; case "exotic": $bg_color = "FF0000"; $color = "0000FF"; break; case "snow": $bg_color = "FFFFFF"; $color = "000000"; break; } ?> body, p { background-color: #<?php echo $bg_color; ?>; color: #<?php echo $color; ?>; }[/code] ___________________ Emps FAQs: [url=http://faq.ozoneasylum.com/53/]Emperor[/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »