2 replies [Last post]
seb
Offline
Enthusiast
Last seen: 15 years 44 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

I have a page that contains an element set to position:relative and lots of child elements with position:absolute.

In that case the absolute positioning should be relative to the parent element, since I set position:relative on it. This works in IE5-6 and firefox.

In opera however, the elements are positioned relative to the root element, and as such are all about 100px too high on the page.

Known bug I presume - fix?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 15 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Opera positioning problem

Hi seb,
Just a thought, do you have top and left values set for the relative parent.
It may be that Opera requires them even if they are set to 0.

seb
Offline
Enthusiast
Last seen: 15 years 44 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

Opera positioning problem

Good idea, but didn't work. Additionally if I set top to 100px then the parent moves down as you'd expect, but the children are still positioned relative to the root of the page.

Opera really is cacker than IE, imho. May have better CSS support, but certainly seems to be buggier!