View Full Version : Defining style in URL
11-06-2006, 11:57 PM
Is it possible to define the style of a page in the url of a page?
11-07-2006, 12:05 AM
You should have asked in the server side section really...
Something like this could be used on that page:
$style = $_GET['styleid'];
echo '<link rel="stylesheet" href="style1.css" type="text/css">';
echo '<link rel="stylesheet" href="style2.css" type="text/css">';
echo '<link rel="stylesheet" href="style.css" type="text/css">';
11-07-2006, 12:11 AM
Would you mind explaining that a little bit as I have no knowledge of anything but HTML and CSS.... :(
11-07-2006, 12:16 AM
Sorry! Well the above I posted is PHP; which is a server side language. It is run (by the server) before the rendered code is passed to the browser.
In that example the code gets the value of 'styleid' in the url, eg. 1 or 2, and enters the code for the specific stylesheet.
There is a lot if you search Google to learn PHP ( http://www.php.net/ , also http://www.w3schools.com/php/default.asp ), and you can check out the PHP section of this forum. It is probably the most popular server side language.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.