What is better: CSS hacks or browser detection?
Posted
by Darryl Hein
on Stack Overflow
See other posts from Stack Overflow
or by Darryl Hein
Published on 2009-01-18T09:18:00Z
Indexed on
2010/03/18
22:41 UTC
Read the original article
Hit count: 642
Commonly when I look around the Internet, I find that people are generally using CSS hacks to make their website look the same in all browsers. Personally, I have found this to be quite time consuming to find all of these hacks and test them; each change you make you have to test in 4+ browsers to make sure it didn't break anything else.
About a year ago, I looked around the Internet for what other major sites are using (Yahoo, Google, BBC, etc) and found that most of them are doing some form of browser detection (JS, HTML if statements, server based). I have started doing this as well. On almost all of the sites I have worked on recently, I use jQuery, so I use the built in browser detection.
Is there a reason you use or don't use either of these?
© Stack Overflow or respective owner