Closed
Bug 3027
Opened 26 years ago
Closed 26 years ago
right not inheriting for absolutely positioned elements
Categories
(Core :: Layout, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: dbaron, Assigned: troy)
References
()
Details
The last example in the above URL is only displaced 50px, but it should be
100px. I can't tell if this also happens for bottom and top because the viewer
has started crashing. It doesn't happen for left. It feels like it should be
my mistake, but it could also have something to do with the width of the div
(i.e. try making div.ten have width 450px and see if it still happens - that
was what I was doing when the viewer crashed (and now it crashes when I try to
start it)).
It looks like my problem. 'right' is inheriting properly, but when I determine
the computed value for 'margin-left' I have a check for whether the available
margin space (per the constraint in 10.3.7) is < 0 and if it is I leave the
computed value as 0. In your example both the P and its DIV containing block
have specified 'width' values of 400
That seems wrong and what I should do instead is allow the value to be negative,
after all the spec allows negative margins
In the case where both 'margin-left' and 'margin-right' are 'auto' and the
available space per the constraint in 10.3.7 is negative should we also compute
a negative value for 'margin-left' in that case? The idea in that case is to
center the element within its parent, so I guess it should extend an equal
amount outside both the parent's left and right edges
Reporter | ||
Comment 2•26 years ago
|
||
Yes. auto values on things that can be negative (i.e., not width) should
always be allowed to become negative from the calculations (not just for
margin-right). Could this explain bug 2058 too??? (I think not, but I'm just
checking...)
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Okay, I just checked in my fix and now I allow the margins to be negative.
Things won't look exactly right until the view manager changes happen so you'll
see content getting clipped when a child sticks outside its parent
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 4•26 years ago
|
||
Verified fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•