Forum Moderators: not2easy

Message Too Old, No Replies

IE8 position relative

         

topher

12:03 am on Sep 19, 2009 (gmt 0)

10+ Year Member



I've got this:

#outership {
position: relative;
}

#shipboxleft {
position: absolute;
top: 0;
left: 0;
height: 80px;
}

<div id="outership">
(other divs open and close here)
<div id="shipboxleft">
...
</div>
</div>

In IE7, FF3 and IE8 Compatibility View shipboxleft appears at the top of outership.

In IE8 (normal view) the div shipboxleft appears at the bottom of outership, below all other child divs of outership.

Anyone know how to fix this for IE8?

swa66

6:07 am on Sep 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Somehow I think the above will not replicate the problem, could you post some *minimal* code that still exhibits the problem ?

One thing to look out for is if you did close all your tags and if your code validates.

topher

3:55 am on Sep 20, 2009 (gmt 0)

10+ Year Member



You are right. After some trial and error testing it appears the problem is because of a form tag nesting error! Like so:

<form ...>
<div id="outer">
</form>
</div>

IE7 doesn't seem to "mind" this. I'm now forcing IE8 into compatibility mode until I rework the flow.
thanks.