On Jun 5, 2011, at 10:05 PM, Philip TAYLOR (Webmaster, Ret'd) wrote:

> Barney Carroll wrote:
>> Keith,
>> 
>> By default. block-level elements occupy the full available width, thus any
>> following block-level elements can only appear directly below.
>>   
> 
> I am unconvinced of this explanation.  At
> 
>    http://web-consultants.org.uk/sites/tests/Block-level-elements/DIVs.html
> 
> you will see two DIVs, each of which is only 33% of the full available width,
> yet they stack vertically, not horizontally.  I would argue that this 
> behaviour
> has nothing to do with their width, and is entirely a result of their being 
> block-level
> elements.

It does have 'something' to do with the width, and the relationship between 
width and margin ( -left and -right).

See CSS 2.1:10.3 – and in particular 10.3.3
http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins

In that testcase, the margin-right is '0', but 'expanded' to fill the remaining 
space.

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






______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
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