Jump to content


Browser detection and appropiate CSS

  • Please log in to reply
1 reply to this topic

#1 AdRock

  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 15 August 2006 - 10:40 AM

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?
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 August 2006 - 11:17 AM

As everyone knows Firefox and IE displays content differently ...

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...e_css_hacks.htm is worth a read.

http://www.thinkvita...top-css-hacking, also worth a read.
Legend has it that reading the manual never killed anyone.
My site

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users