2.1.56 [CSS-Level2-2009] Section 10.3.3, Block-level, non-replaced elements in normal flow
V0084:
-
If all of the above have a computed value other than 'auto', the values are said to be "over-constrained" and one of the used values will have to be different from its computed value. If the 'direction' property of the containing block has the value 'ltr', the specified value of 'margin-right' is ignored and the value is calculated so as to make the equality true. If the value of 'direction' is 'rtl', this happens to 'margin-left' instead.
Quirks Mode (All Versions)
When one or more of the listed properties are
"over-constrained" and the value of the direction property is ltr
, the margin-right property is not adjusted.
Instead, both margins and paddings are applied and the content box is reduced.
IE8 Mode (All Versions)
The value of the margin-left property is not
recalculated and the value for margin-right is not set to 0 when the direction
property is set to rtl
.
V0216:
-
The following constraints must hold among the used values of the other properties: 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containing block
Quirks Mode (All Versions)
The box model does not meet this constraint.
V0217:
-
If there is exactly one value specified as 'auto', its used value follows from the equality.
Quirks Mode (All Versions)
The box model does not respect the inequality defined in this section.
V0218:
-
If both 'margin-left' and 'margin-right' are 'auto', their used values are equal. This horizontally centers the element with respect to the edges of the containing block.
Quirks Mode (All Versions)
When both margin-left and margin-right are auto
, margin-left takes precedence when in RTL,
and margin-right takes precedence when in LTR. This, in effect, consumes
all of the available margin space that should be distributed equally between margin-left
and margin-right.