CSS 2.1 - 10.3.3 - Block-level, non-replaced elements in normal flow



I have few questions about the rules in CSS 2.1 - 10.3.3 - Block-level,
non-replaced elements in normal flow. According to this section the
following equation must be satisfied: 


margin-left + border-left + padding-left + width + padding-right +
border-right + margin-right = containing block's width


Then, a number of rules are applied in order to satisfy the above.
Here's an example which illustrates my questions:


<div style="width:0px;">

    <div style="margin:10px;">text</div>  <- - This is the block-level
element I want to apply these rules to.



1.        First statement does not apply since the width is 'auto' (from
its initial value)

2.       Second statement does not apply for the very same reason

3.       Third rule does apply since we have exactly one value of
'auto', namely the width. So the spec suggests that value follows from
the equality above, which would make the used width to be negative value


However, section CSS2.1 - 10.2 Content width: the 'width' property,
states that "Negative values for 'width' are illegal." So here goes my
questions J


1.        Is the width property handled as a special case to all these
scenarios (undocumented)?

a.       If so, then I assume margin-right (assuming ltr) must take the
negative value?

2.       What about other properties such as padding-left|right and
border-left|right, are these allowed to become negative following these




Rossen Atanassov


Received on Tuesday, 6 November 2007 16:43:30 UTC