Recently, I started to like the idea of separate stylesheet for IE.
Usually, I have three stylesheets - one for standard compliant
browsers (more or less) - firefox, last revs of opera, safari and any
other with gecko or khtml engine. The rendering differences are very
minor for these browsers and it is easy to have clean css. The second
stylesheet is for IE. I just take my standard-complaint (no hacks)
stylesheet and modify the parts that are not working in IE. You may
want to not to have a third stylesheet and serve one of the
beforementioned stylesheets to the unknown browsers. But I do have
third one. It uses very basic css and should work in old operas and
other 1% market share browsers. At least, these users can access your
Then I do detect browser by user-agent. Yes, we’ve heard that it is
not good, for user can change his user-agent string. But:
- Most(really) of them don’t (especially those IT-ignorant)
- If they do, then they must whay they do or face consequences
This tehnique works for me. Haven’t got any complaints.
And I don’t need much more time to maintain 3 separate stylesheets for
it is easy to create standard-compliant version (no hacks). And then
you just need to tweak it for IE without worry that your hacks will
break the intended behaviour of all good browsers. Third stylesheet is
really simple - only basic styling to get accessible content.
My approach is inspired by
I dislike the idea to mix code and css, so I invented my own approach.
Just my .02 cents