User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:220.127.116.11) Gecko/2009033117 Mandriva/18.104.22.168-0.1mdv2009.0 (2009.0) Firefox/3.0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:22.214.171.124) Gecko/2009033117 Mandriva/126.96.36.199-0.1mdv2009.0 (2009.0) Firefox/3.0.8
The child element of an inline div is misplaced. It is actually positioned with respect to the top line of that div, rather than the bottom. Both Opera and Konqueror behave differently, so this is probably a genuine bug.
Steps to Reproduce:
Look at the following HTML. (I'll attach screenshots shortly)
<div style="position:relative; display:inline; background-color:#0F0">
This is an inline div.<br>Here is the second line<br>And a third line<br>And now a fourth and final line
<div style="position:absolute; left: 0; bottom: 0; display:inline; background-color:#F00">
The red 'x' is positioned at the TOP of the parent div. It should be placed at the bottom.
Both Firefox 3.5 and Firefox 3.6a1 (today's nightly) show the same behaviour. But Opera and Konqueror show different behaviour.
The inner div has "bottom: 0", therefore the bottom of the 'x' should be aligned with the bottom of the parent div.
Created attachment 373589 [details]
Screenshots in Firefox/Konqui/Opera
Here is a tarball of 3 png files, showing the rendering in Firefox, Konqueror (3.5) and Opera (9.64) respectively.
The HTML source of all of them is exactly the same (excepting that I changed the <h2> to show the correct name)
dupe of bug 5016, I think
I think you're probably right. 10 years, and half-a-million bugs later ;-)
Any chance of a fix? Web designers now tend to regard Firefox as the de-facto implementation of the standards, and test here first.
*** This bug has been marked as a duplicate of bug 5016 ***
Reopening per bug 5016 comment 32.
Created attachment 373682 [details]
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:188.8.131.52) Gecko/2009032609 Firefox/3.0.8
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090202 Minefield/3.2a1pre
There is an explanation of what needs to be done to fix this starting from bug 5016 comment 17.
*** Bug 543383 has been marked as a duplicate of this bug. ***
We should also figure out what the spec says about bidi issues: see http://lists.w3.org/Archives/Public/www-style/2011Jan/0538.html
Make it undefined what containing block is formed by a relpos inline that splits across multiple lines
(which was removed from /latest/ and /nightly/ :
If the element has 'position: absolute', the containing block is established by the nearest ancestor with a 'position' of 'absolute', 'relative' or 'fixed', in the following way:
In the case that the ancestor is an inline element, the containing block is the bounding box around the padding boxes of the first and the last inline boxes generated for that element. In CSS 2.1, if the inline element is split across multiple lines, **_the containing block is undefined_**.
CSS2.1, §10.1 Definition of "containing block"
So, I'd say this bug is not valid for CSS 2.1.
CSS3 is a bit different:
If the element has ‘position: absolute’, the containing block is established by the nearest ancestor with a ‘position’ other than ‘static’, in the following way:
In the case that the ancestor is inline-level, the containing block depends on the ‘direction’ property of the ancestor:
If the ‘direction’ is ‘ltr’, the top and left of the containing block are the top and left content edges of the first box generated by the ancestor, and the bottom and right are the bottom and right content edges of the last box of the ancestor.
CSS Positioned Layout Module Level 3, Working Draft 7 February 2012
§3.1. Definition of containing block
as it now refers to content edges (and not padding edges) and it does not specify what happens if the positioned ancestor inline box is split in multiple line boxes.
Is there any push at all to implement this? It's inconsistent with all major browsers causing me quite a few headaches. It's been half a year since this was last discussed which is quite alarming.
Still experiencing this bug, and can confirm it is still inconsistent with Chrome and IE implementation.
*** Bug 1133525 has been marked as a duplicate of this bug. ***