On 2/7/2010 11:20 PM, David Mehler wrote:
Hello, I'm trying to set up a web site. This site has multiple stylesheets, one default stylesheet that should be used if the other is not chosen. The second is a high contrast stylesheet and can be selected by user's who need it. I'm also thinking of adding two more for smaller and larger font selections. My issue is I want the high contrast sheet to be used on all subsequent pages and on subsequent visits to the site by user's who have selected it. I thought of using php with this and cookies. I'm using php5 and would appreciate any suggestions, googling has shown some examples, but none are working. Thanks. Dave.
Dealing with style sheet caching by all the different browsers and the user's settings for them is the big problem.
I'd suggest this: Use the sessions buffer for simplicity. And, link your complete [all the selectors] default css file in the header.
Then, include ONLY the selectors needed to render the special selectors in the html's header style block. These selectors will override those in the css file.
Now, simply modify the selectors here when you return the page. Far as I know, all browsers honor revised styles when they are in the page html header.
<header> <style type="text/css"> <!-- special selectors go here --> </style> </header> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php