Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: IE broke my CSS


zageek
Participant

@zageek

I know exactly what you mean. IE has always been terrible with standards and full of bugs.

Make sure you remove any commented out selectors from your CSS as IE ignores the fact that you commented them out.

Your best bet is to use a separate style sheet for IE browsers. You can do this by adding conditional comments inside <head>

<!--[if IE6]>
put you stylesheet link here for IE 6 only
<![endif]-->

or you could use this to detect browser higher than IE6

<!--[if gte IE 6]>
put you IE 6 and above stylesheet here.
<![endif]-->

Only IE parses these conditional comments so firefox, chrome etc will ignore them.

This works pretty well and allows you to support many browsers. Remember Firefox is more of a power user thing. Most lay people tend to use what comes in the box ie IE. So you can expect to see a lot of IE6 and IE7 browsers visiting your site.

Skip to toolbar