W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [CSS 2.1] [Section 10.3.3] Questions on width of block-level, non-replaced elements in normal flow

From: Alan Gresley <alan@css-class.com>
Date: Wed, 25 Aug 2010 13:53:09 +1000
Message-ID: <4C7493A5.3070104@css-class.com>
To: www-style@gtalbot.org
CC: www-style list <www-style@w3.org>
Alan Gresley wrote:
> Gérard Talbot wrote:
> [snip]
>> 2-
>> The spec says:
>> "
>> If there is exactly one value specified as 'auto', its used value follows
>> from the equality.
>> "
>>
>> What if the one single specified value as 'auto' is width and complying
>> with the equation would imply that the used width is negative... How 
>> could
>> this be?
>>
>> E.g.:
>> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-non-replaced-width-0xx.html 
>>
>>
>> I must be missing something here...
>>
>> regards, Gérard
> 
> 
> Yes you are missing something Gérard. The same results would be seen if 
> the child had this.
> 
> div#child
>   {
>   border-right: green solid 200px;
>   margin-right: 10000px;
>   }
> 
> 
> The div#child is completely overflowing it's containing block 
> (div#containing-block) which is width:0. The visual overflow causes 
> elements to overlap (this is not quite obvious in your test case).
[snip]

To follow up, what is happening is the declared value of div#child of 
  margin-right: 400px (in Gérard's test case) or my ridiculous 
margin-right: 10000px are completely being ignore. The computed value 
is margin-right: -400px. This is seen by adding an additional element 
after div#containing-block.

<http://css-class.com/test/block-non-replaced-width-0xx-gtalbot.htm>


This test shows correct in all implementations including IE7.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Wednesday, 25 August 2010 03:53:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT