Not IE6 IE7 Hack

I managed to create a page that crashes IE6 and 7 regularly: http://raven-seo-tools.com/blog/2675/crash-ie6-with-only-css

I have a solution for non-IE browsers (display: inline-block), but the only way to get IE6 / 7 to work is to use a different CSS (display: inline). Typically I would use other browsers inline-block and then in a separate IE67 CSS file I would set the display to inline.

The problem is IE67 crashes as soon as they get to display: inline-block line, so I need a way to hide this code from IE6 and 7, but not other browsers.

UPDATE:

Conditional comments are not an option! IE67 crashes as soon as they reach the line for other browsers, so the conditional css will never work. I need a way to hide this line from IE67. Contional Comments do not allow you to hide CSS from IE67.

UPDATE 2:

Ok, it looks like conditional comments are an option. Giving the correct answer to the person who gave me exactly what I was looking for though.

+2


a source to share


3 answers


Use a html>/**/body

hack.



html>/**/body .someclass {
    /* Will be applied on everything but IE6/IE7. */
}

      

+3


a source


These conditional comments can work. mincss.css

loads in IE8 and other browsers, and ie6-7.css

loads in IE7 and below.



<!-- <![if (!IE)|(gte IE 8)]> -->
    <link rel="stylesheet" href="maincss.css" type="text/css" />
<!-- <![endif]> -->
<!-- <![if (lte IE 7)]>
    <link rel="stylesheet" href="ie6-7.css" type="text/css" />
<![endif]> -->

      

+3


a source


Conditional comments work very well for such problems.

+1


a source







All Articles