Take the 2-minute tour ×

Excerpt of the question: I have a menu which works in every browser but was buggy on IE7. I solved throwing zoom:1 but normally the hasLayout related problems involves float, position and stuff. Why this time zoom made it work?

I have a menu which works in every browser (even on IE8+) which looks like this: Menu on every browser

Consists of a LI which holds a DIV working as a 1px border using a .png BG and a block A that have an icon and text.

The resumed HTML would be ul.adminMenu>li>(div.menuBorder)+(a{link}):

<ul class="adminMenu">
        <div class="menuBorder"></div>
        <a href="">link</a>
    (...other li's...)

The li.active gets a darker BG.

Unfortunately I'm obligated to make it work on IE7 Standards Mode (That explains why I use a div with .png instead of RGBA border) which is looking like this:

Menu on IE7

Yes. There is a whatsoever space between the start of li and the "border" div. I already tried the following methods:

None of them have worked and there is nothing on Dev Tools which points to a margin or border (all are 0 with !important).

So the question is: There are no floated elements, no absolute positioned things, just blocks. Why zoom:1 (which trigger hasLayout) make all damned spaces go away?

The JsFiddle (There is some extra markup divs but ignore them, had more stuff that I removed for the sake of simplicity)

I know it's part of IE 'features (bugs)' but I was looking for something else as an answer.

share|improve this question

1 Answer 1

up vote 1 down vote accepted



The most evident effects are:

Layout applied to a list makes the markers to disappear or to be differently/wrongly positioned.


Layout applied to list elements creates the same problems as above, and more (extra vertical space between list items)






For more detail visit : http://www.satzansatz.de/cssd/onhavinglayout.html

share|improve this answer
Where does it suggest in the question that any of the elements are inline? –  BoltClock May 10 '13 at 2:32
@BoltClock Actually, the last paragraph of his quote talks about the block anchors inside LI elements. But I've tried adding zoom and width to the anchors (and separators) and didn't worked out. Just the zoom on the LI itself rather than the anchor (contrary to what was suggested on the article) that worked. But @C-Link, awesome find. If noone else answers, I'll have yours as accepted, since the article has quite nice info about old IE's hasBugLayout :) –  RaphaelDDL May 10 '13 at 13:06

Your Answer


