![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Do i also need to link the stylesheets in the html as alternate stylesheet? Or isn't there any need, since i allready offer a way of picking a different stylesheet? There is no need for that in technical sense. But Mozilla(Firebird) |
#3
| |||
| |||
|
|
Currently i offer 4 stylesheets, the user can use the php based style switcher to select a different stylesheet. (code was found on this group ) |
|
Do i also need to link the stylesheets in the html as alternate stylesheet? |
|
Or isn't there any need, since i allready offer a way of picking a different stylesheet? |
#4
| |||
| |||
|
|
There is no need for that in technical sense. But Mozilla(Firebird) users will be happier, since their browsers offer to change style sheets based on the <link>-tag in your HTML code, without having to use your PHP script. |
#5
| |||
| |||
|
|
But Mozilla(Firebird) users will be happier, since their browsers offer to change style sheets based on the <link>-tag in your HTML code |
#6
| |||
| |||
|
|
Fabian Neumann wrote: There is no need for that in technical sense. But Mozilla(Firebird) users will be happier, since their browsers offer to change style sheets based on the <link>-tag in your HTML code, without having to use your PHP script. Ditto regular Mozilla, ditto Opera, ditto Konqueror[1]. *However* a PHP style switcher is in many ways *better* than just relying on rel="alternate stylesheet", as browsers don't[2] carry over the choice of an alternate stylesheet when you go on to the next page :-( Of course, *best* is to offer both. (Which I do) [1] Konqueror 3 does funny things with alternate style sheets. When a list of alternate stylesheets is given, it uses the first one by default! I have yet to add a workaround to my site, although I do plan to do so[3]. Safari does not suffer from this bug. More details here: http://bugs.kde.org/show_bug.cgi?id=54335 [2] Except Konqueror. [3] I generally don't work around bugs in browsers, but the fix should be pretty easy. -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?id=132 |
#7
| |||
| |||
|
|
Fabian Neumann wrote: There is no need for that in technical sense. But Mozilla(Firebird) users will be happier, since their browsers offer to change style sheets based on the <link>-tag in your HTML code, without having to use your PHP script. Ditto regular Mozilla, ditto Opera, ditto Konqueror[1]. *However* a PHP style switcher is in many ways *better* than just relying on rel="alternate stylesheet", as browsers don't[2] carry over the choice of an alternate stylesheet when you go on to the next page :-( -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?id=132 |

#8
| |||
| |||
|
I'm using the script you wrote Toby (i think) it works great ![]() Any chance of making it available for me. |
#9
| |||
| |||
|
|
Samukl van Laere wrote in alt.html: Hello David, This is the code as it was published by Toby: ============================ example.php ============================= !DOCTYPE whatever ?php $s = $_GET['style']; if (!($s)) { $s = 'red'; } ? [snip] link rel="stylesheet" type="text/css" media="screen,projection" ?php echo ' href="styles/' . $s . '.css"'; ? [snip] One might note that there's a potential security issue with allowing the user to put anything they want in the $s variable. |
#10
| |||
| |||
|
|
[newsgroups set back to include alt.html, as I don't read comp.lang.php -- PHP sucks] |
![]() |
| Thread Tools | |
| Display Modes | |
| |