Html Conditional Stylesheets statement change page in ie8

I’m using Paul Irish’s html Conditional Stylesheets statement

    <!--[if lt IE 7]> <html lang="en-US" class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
    <!--[if IE 7]>    <html lang="en-US" class="lt-ie9 lt-ie8"> <![endif]-->
    <!--[if IE 8]>    <html lang="en-US" class="lt-ie9"> <![endif]-->
    <!--[if gt IE 8]><!--> <html class=""> <!--<![endif]-->

In ie8 including the statement changes the structure of the page.

The relavant class is added to the html tag but it seems to make the page narrower and some of the css seems to stop working.

This is in a wordpress site and I’m using bootstrap.

I know it a vague question without a live demo but does anyone have an idea why this might be.


It looks like zoom: 1; is being added to the body which is changing the layout.

is this more a problem with my css not working in ie8

Difficult to tell without live example, because I don’t see any errors in your conditional comments. Can you put it online?

zoom:1.0 on the body should have no effect in IE8 as it doesn’t have the haslayout behaviour and even in IE7 and under the body has haslayout by default so applying it to the body is nonsense.

If you are doing something silly like * {zoom:1.0 } then that will break IE7 and under completely.

I’d need to see the html and css to hazard a proper guess but generally zoom has no effect in IE8 other than zooming the layout.