Closed Bug 25002 Opened 26 years ago Closed 26 years ago

Inline absolute positioned elements are placed below normal text flow.

Categories

(Core :: Layout, defect, P3)

All
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: emontev, Assigned: troy)

References

Details

(Keywords: css2)

The following HTML snippet behaves differently in IE and Mozilla: <BODY> Some Text <SPAN style="position:absolute; background:blue;">Absolute Text</SPAN> </BODY> In IE the absolute text follows the normal flow of text but does not take up space in the flow which is what the CSS standard specifies. In Mozilla the absolute text is positioned below the the normal flow of text. Is there a reason for this?
Status: NEW → ASSIGNED
David, is this a dup of some other bug that is hanging about somewhere? I seem to recall this was discussed at some point in the past. Personally, I think our behaviour is wrong since the span has "display:inline" and "left:auto; top:auto;" which per the spec means that the element should be displayed in the same place as if it had not been positioned at all.
Keywords: css2
Bug 12962 covers (something close to) the reverse problem, but I'm not sure if there's one on this. (That both this and the reverse occur makes me thing something could be backwards somewhere...)
No, the issue is how Kipp does line layout. What I have always been doing is to take the position of the placeholder frame and use that for the y-offset wheb 'top' is 'auto' That used to work fine, but somewhere along the way Kipp changed line layout and now the placeholder is getting positioned differently within the line (it's a {0, 0} box and hence subject to baseline alignment)
Here is the snippet quoted above in a complete test case: http://www.bath.ac.uk/%7Epy8ieh/m/absolute-inline-pos.html
*** Bug 31984 has been marked as a duplicate of this bug. ***
Fixed. Now we do a better job or calculating where the element would have been if it had been in the flow. Note that the spec allows the user agent to guess as to the probably location, so if I were you I wouldn't rely on all user agents calculating the position in a consistent manner
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Marking verified fixed in the May 30th builds.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.