Friday, September 25th, 2009 | Geek Out, Tips, Tutorials, Web Dev

Absolutely positioned div disappears in IE6.

What is up with this? I really hate IE6, but this is so incredibly stupid that you have to do this. The problem is that if you have an absolutely positioned item next to a floated item, the absolutely positioned item mysteriously disappears. I spent a half-hour working on this before finding a resource that was helpful. Unfortunately, I can’t remember where it was, so this is what you do:

Wrap the Abs Pos div in a non-semantic div. like this:

<div class="abrakadabra"></div>
<div style="position:absolute;top:0;right:0;>Content inside Div</div>
<div class="abrakadabra"></div>

And there you have it! That will fix the disappearing div.

Oh, and this site rocks for fixing bugs in IE6: Ultimate IE6 Cheatsheet

No Comments yet

Leave a Comment