AdRock Posted August 15, 2006 Share Posted August 15, 2006 I am trying to find an example of a simple browser detection script thats checks the users browser and calls the right css stylesheet.As everyone knows Firefox and IE displays content differently I am looking for a solution to create a stylesheet for both browsers and the browser detection would decide which style sheet to link to.Is there any simple scripts out there that can do this job? Link to comment https://forums.phpfreaks.com/topic/17608-browser-detection-and-appropiate-css/ Share on other sites More sharing options...
AndyB Posted August 15, 2006 Share Posted August 15, 2006 [quote author=AdRock link=topic=104327.msg416063#msg416063 date=1155638449]As everyone knows Firefox and IE displays content differently ...[/quote]Sweeping generalizations like that don't help. All of the sites I've worked on have used a single CSS stylesheet that works with IE, FF, Moz, and Opera and which complies with the W3C standard. If you want to use CSS declarations that are unsupported by a particular browser (and that's your decision) then conditional CSS makes more sense and is much easier to maintain than separate stylesheets for different browsers. http://www.stylegala.com/articles/no_more_css_hacks.htm is worth a read.http://www.thinkvitamin.com/features/css/stop-css-hacking, also worth a read. Link to comment https://forums.phpfreaks.com/topic/17608-browser-detection-and-appropiate-css/#findComment-75028 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.