Absolute/Fixed elements align with Adjacent elements

I have a fixed div that is supposed to reside on the left side of the page and remain static using fixed positioning. There is another div adjacent to it that has a margin property that ensures it remains shifted to the right of my fixed element.

This looks fine in Firefox and Opera, but in IE7 the fixed element seems to 'inherit' somehow the margin of the adjacent element and positions itself relative to it, so that they share the same left margin. Any repositioning of the fixed element is relative to its adjacent node. This also happens if the node is adjacent.

Test page Workaround is not included
Reported by: Randeep.

Explorer 7 | Reported on 4 September 2007.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.




Search reports by browser:

Atom RSS

Comments

(Add your own)

1 Posted by Adam on 10 March 2008 | Permalink

This bug has to do with the img tag more than the buttons themselves. Applying this CSS globally does the trick:

img {vertical-align:text-bottom;}

Alternatively, you could use an image style class, etc.

This also doesn't seem to cause any bugs in IE 7.

Good luck!