Opera Bug #273377 ⇒ CORE-28721

Inline elements inside inline parents set to position:relative; give wrong offset values

Still only partially fixed in Opera 12.15

If one takes an arbitrary element and gets its offset values, then adds to that the offset values of its offsetParent, than adds to that the offset values of its offsetParent, etc. Eventually you will properly calculate an element's position relative to the outermost offsetParent, or the document itself.

However, when the offset values for an inline element are calculated, Opera has trouble with the values when these elements are themselves contained within an inline parent which has the CSS property position:relative;

Click an Item below to display its calculated offsetLeft and offsetTop relative to the entire document.

(offsetLeft, offsetTop) =>

Inline elements in an inline parent set to position:relative; (buggy)

Item #1, Item #2, Item #3, Item #4, Item #5,
Item #6, Item #7, Item #8, Item #9, Item #10

Inline elements in an inline parent with default position (OK)

Item #1, Item #2, Item #3, Item #4, Item #5,
Item #6, Item #7, Item #8, Item #9, Item #10

Inline elements in a block parent set to position:relative; (OK)

Item #1, Item #2, Item #3, Item #4, Item #5,
Item #6, Item #7, Item #8, Item #9, Item #10

Inline elements in a block parent with default position (OK)

Item #1, Item #2, Item #3, Item #4, Item #5,
Item #6, Item #7, Item #8, Item #9, Item #10

Main Bug List