On Feb 23, 2010, at 11:44 PM, Bruno Fassino wrote:

>> <http://css-class.com/test/css/visformatting/ap-collapsing-margins.htm>
> 
> 
> I haven't looked at the details, but think that the Opera "problem" is
> not much with margins collapsing but with top:auto positioning of an
> absolutely positioned box. (Indeed you say in your page that even in
> 2a, 2b the margin collapsing between container and paragraph is
> correct).
> 
> I have here another simple example where a top:auto a.p. box is
> positioned differently in Opera than in all other modern browsers.
>  http://www.brunildo.org/test/Op_top_auto.html

Opera 10.5a displays this the same as Gecko 1.9.0+ and WebKit/Safari 4.0.
That is the only display that makes sense. The top box has a margin-bottom of 
100px, thus will push down the red, a.p. box 100px anyway if it were static. 
Once the box is positioned (a.p.) - removed form the flow, the margins between 
the top box and the bottom one collapse together and the a.p. box overlaps the 
bottom paragraph. The a.p. box should certainly not jump to touch the bottom of 
the top box. Opera 10.0 and older is absolutely wrong in what it does.

Alan's testcase (#2) is different in that what moves things around is a top 
margin of an element that follows the a.p.-element. I think you're right to say 
(quoted below) that there is more ambiguity in the spec. Opera seems to compute 
top before taking the margin collapsing into account, others do it having 
already taken that margin-collapsing into consideration.
 
> I don't think these different behaviors can be strictly considered
> bugs, at least according to my reading of the spec at
>  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
> They mention a "static position" saying that "user agents are free to
> make a guess at its probable position". If this reading is correct,
> "top:auto" is somewhat undefined for a.p. elements.

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to