Jump to content

links to css / changing stylesheets with a click


omf

Recommended Posts

I am pretty new to css and advanced html/php&whatever...I am looking for a quick way to change the css on a page, e.g. with a link to another css file...(example www.csszengarden.com how do they do it?)Anyone out there that can help me?

Link to comment
Share on other sites

thanks.this was what i was looking for, i have also gotten a tip using php to do the same:<html><head><?if (isset($_REQUEST["css"])) { print '<LINK rel="stylesheet" href="'.$_REQUEST["css"].'.css" type="text/css">';} else { print '<LINK rel="stylesheet" href="default.css" type="text/css">';}?></head><body>Example of link changing css..<a href=?css=default>Default</a><br><a href=?css=second>Alternate</a><br>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...