- From: Rossen Atanassov <ratan@windows.microsoft.com>
- Date: Tue, 6 Nov 2007 08:41:35 -0800
- To: <www-style@w3.org>
- Message-ID: <802A881C87166D4597F9EEFC3F04F4F8062403BE@WIN-MSG-20.wingroup.windeploy.ntdev.mi>
Hello, 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. </div> 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 (-20px). 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 rules? Thanks! Rossen Atanassov
Received on Tuesday, 6 November 2007 16:43:30 UTC