Re: CSS / PHP / Javascript
| From: | Al | Date: | Wed, 15 Nov 2006 14:36:26 +0000 |
| Subject: | Re: CSS / PHP / Javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244661@lists.php.net to get a copy of this message | ||
Ed Lazor wrote:
I'm reading a book on CSS and how you can define different style sheets for different visitors. I'm wondering how you guys do it. The book recommends using Javascript functions for identifying the user's browser and matching them with the corresponding style sheets. Anyone using PHP for this instead - specifically with defining style sheets for different target browsers and platforms? -Ed I've found, that as a practical matter, the only browser these days thatcauses problems is IE6 because of it's non-compliance with some W3C standards. MS promises these are fixed in IE7. So I simply use $_SERVER['HTTP_USER_AGENT'] to determine if the client is IE6 and either link in a special CSS file for it. Or if my styles are defined in the header, I replace the necessary selectors. There is no need to complicate things with JAVA script.