Topic: CSS: Absolute positioning woes with IE
As the title suggests, I'm having some absolute positioning woes with IE.
To explain what I'm trying to do, consider the following two screens from a PunBB style/theme I'm working on:
In Opera (and FF, Safari etc.):
Notice how the absolute positioned menu at the top goes all the way from left -> right?
Well, then look at a IE6 screenshot:
Then, here's an extract of the CSS relevant to the positioning:
#punwrap { margin: 158px 20px 20px 20px }
.pun #brdmenu {
position: absolute;
left:0;
top:0;
right:0;
}
See, this would work in any *real* browser, but of course, IE doesn't play along (and don't even get me started on the IE7 beta!). Adding width:100% to the .pun #brdmenu block improves thing a bit, but not entirely (IE still positions it relative to #punwrap, something it shouldn't). Of course, removing the margins from #punwrap would solve it, but that's not what I'm looking for. Surely, using absolute positioning on a element should remove it from the "regular" flow of the document?
Anyone have any good suggestions on how to solve this, without having to move the menu block outside #punwrap in the .tpl (something which would kinda mess up the structure for non-css browsers)?
Any input would be greatly appreciated