On Jan 14, 2007, at 5:43 AM, Bruno Fassino wrote: > Michal Cizmazia wrote: > >> http://cim.szm.sk/min-height.html >> >> My question is: Which browser does it right, FF2 or IE7? >> -- >> Text of my test case: >> >> CSS 2.1 Specification: The percentage is calculated with respect to >> the height of the generated box's containing block. If the height of >> the containing block is not specified explicitly (i.e., it depends on >> content height), and this element is not absolutely positioned, the >> percentage value is treated as '0' (for 'min-height') >> >> It seems to me, that the expression this element refers to the >> containing block (black border) not the generated box (orange >> background). > > > Hmmm, no, I think "this element" is the element having the min-height > declaration, so in your case the orange one, not the containing block. > That sentence in the spec is about the same as for the 'height' > case, where > there is also the following clarification: > "Note that the height of the containing block of an absolutely > positioned > element is independent of the size of the element itself, and thus a > percentage height on such an element can always be resolved." > According to my understanding this clarifies that "absolutely > positioned" > refers to the element having the [min-]height property, not to the > containing block. > > So the Firefox behaviour that your test case shows seems somewhat > incorrect > to me.
Firefox 2.0, the latest trunk Gecko builds and the latest nightly builds of WebKit (Safari) all make the orange box the height of the parent box. iCab 3.0 also makes the orange box the size of the black-bordered box in both cases. > It seems related to the fact that your containing block has both > top and > bottom specified, and this is more or less "equivalent" to having a > height > specified. Indeed if you remove the bottom property and add some > content to > your contaning block (so that its height becomes dependent on this > content), > then _only_ the case with position:absolute on the orange box > causes the > orange box itself to stretch. > And if you leave the bottom property in, but add some content to the absolute positioned box, the a.p. box will be sized accordingly (the same as in http://cim.szm.sk/min-height.html) - computed height: 65px on my side, but the content will overflow. The orange box will take the height (65px) of the parent. Philippe --- Philippe Wittenbergh <http://emps.l-c-n.com> ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/