It is so clear that the web design world is full of incompabilities with different behaviours on different browsers, browser versions and OSs.
PHP CSS Browser Selector is a tiny PHP function which enables us to write specific CSS code for each operating system and each browser.
nce it is called (<?php echo css_browser_selector() ?>
), it outputs something similar to “gecko ff3 win” according to your OS and browser environment.
When you call it inside the class of an element, just like: <html
class="<?php echo css_browser_selector() ?>">
will return <html
class="gecko ff3 win">.
And, if you have the rules ready for .gecko, .ff3 and .win, then you’re all set.
The function is a good fit, specially if you’re not able to target users with JavaScript for a reason (usually, if the JS is turned of)
Website: http://www.bastian-allgeier.de/css_browser_selector/
You can find a more feature rich version of the browser detector in my little PHP toolkit, called Kirby