Categorized: Browsers, CSS

IE and Absolute Positioning

There are some seriously messed up things with absolute positioning in IE 6. I struggled and struggled tonight trying to get a logo to sit in the top left part of the #wrapper div:

#logo { position: absolute; }
#wrapper { position: relative; }

The logo was just not there. I ended up putting it in one of the main content columns, and it showed up in the right place (luckily, it also works in other browsers as well that way).

I couldn’t find much, if anything, useful about this behavior. Why do I always have some trouble with absolute positioning? Why aren’t more people blogging about this? Absolute positioning is supposed to be so easy that it’s considered cheating.

Comments

JTJ → October 30th, 2006 at 4:39 am

I’ve never really had that much trouble with absolute positioning. I assume you have your z-index set appropriately?

Trey → October 30th, 2006 at 10:27 am

Yeah, z-index wouldn’t do squat.

Patrick Born → February 4th, 2007 at 6:08 pm

Sounds like the same problem I had a work last week. I couldn’t absolutely position direct children of the element that I’m positioning it relative to. I eventually used a span to call it #container span #nav.

What do you think about that?

Elsewhere in the empire: Home, Blog, APOD