2.1.32 [CSS-Level2-2009] Section 8.3, Margin properties: 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin'
V0035:
-
‘margin-top’, ‘margin-bottom’ Value: <margin-width> | inherit Initial: 0 Applies to: all elements except elements with table display types other than table-caption, table and inline-table Inherited: no Percentages: refer to width of containing block Media: visual Computed value: the percentage as specified or the absolute length These properties have no effect on non-replaced inline elements.
Quirks Mode and IE7 Mode (All Versions)
The margin-top and the margin-bottom properties are not ignored when applied to elements with the following table display types:
table-cell
table-row-group
table-column-group
table-header-group
table-footer-group
table-row
table-column
IE8 Mode (All Versions)
When a parent element has a percentage-based padding
value specified (for example, padding-top: 10%
)
and a child element has a vertical margin specified (for example, margin-top:100px
), the vertical margin is ignored by
the child element and then applied to the parent element instead.
All Document Modes (All Versions)
The width of shrink-to-fit elements is incorrect when children elements have width and horizontal percentage-based margins.
Content outside the page box is discarded when negative margins are used.
V0036:
-
‘margin-right', 'margin-left' Value: <margin-width> | inherit Initial: 0 Applies to: all elements except elements with table display types other than table-caption, table and inline-table Inherited: no Percentages: refer to width of containing block Media: visual Computed value: the percentage as specified or the absolute length These properties set the top, right, bottom, and left margin of a box.
Quirks Mode and IE7 Mode (All Versions)
The margin-left property is not ignored when it is applied to elements with the following table display types:
table-cell
table-row-group
table-header-group
table-footer-group
table-row
The margin-right property is not ignored when it is applied to elements with the following table display types:
table-cell
table-column
table-header-group
table-column-group
table-row-group
Quirks Mode (All Versions)
When the margin-left and margin-right properties
are set to auto
, the element will not center.
V0037:
-
‘margin' Value: <margin-width>{1,4} | inherit Initial: see individual properties Applies to: all elements except elements with table display types other than table-caption, table and inline-table Inherited: no Percentages: refer to width of containing block Media: visual Computed value: see individual properties
Quirks Mode and IE7 Mode (All Versions)
The margin property is not ignored when it is applied to elements with the following table display types:
table-cell
table-row-group
table-column-group
table-header-group
table-footer-group
table-row
table-column