PDA

View Full Version : External CSS Changer Please help...


dmknetwork
03-31-2003, 12:14 PM
Quick question, and probably easy to answer for a few of you...Not me :( Thats why i am here :D . Right, on my homepage i want a simple drop box which can change External CSS on the fly. By that i mean, i want a user to be able to pick a style, press change, and then it automaticly applies that style to the page. i got sent this one by some PHP expert:

<?
if ( !isset($skin) )
{
$skin = "style.css"; //if no skin has been selected, use the default
}
require("styles/$skin"); //include the stylesheet for the skin (stored in //the /styles/ directory)

?>
This also came with skin.php and a form


But this dont work, and i dont wanna use PHP anyways, it dont work with frontpage or dreamweaver, so could someone PLEASE show me a HTML/ Javascript Based External CSS Changer! Bearing in mind i want it to be my CSS's in my CSS directory and not one that the user chooses the colours, cos there really poo... :(

Replies Apriciated, DMK.

D856C
03-31-2003, 12:37 PM
Try Making Alternate Style Sheets Work (http://www.alistapart.com/stories/alternate/) A List Apart.

This is also a nice way to do basic usability like a large type version. But it is up to you as to what you want to switch.

dmknetwork
04-01-2003, 10:50 AM
I think that is exactly what i am looking for, and as it is DOM, Javascript and obviously CSS it seems Very Front Page Friendly :D Thank you v much, but if anyone else has anything please post them, as i will try them all, thanks. :cool: