2.1.55 [CSS-Level2-2009] Section 10.2, Content width: the 'width' property
V0083:
-
<percentage> Specifies a percentage width. The percentage is calculated with respect to the width of the generated box's containing block. If the containing block's width depends on this element's width, then the resulting layout is undefined in CSS 2.1. Note: For absolutely positioned elements whose containing block is based on a block-level element, the percentage is calculated with respect to the width of the padding box of that element. This is a change from CSS1, where the percentage width was always calculated with respect to the content box of the parent element.
Quirks Mode (All Versions)
The percentage is calculated with respect to the content box of the parent element. In addition, the box model includes borders, padding, and content widths.
V0214:
-
'width' Value: <length> | <percentage> | auto | inherit Initial: auto Applies to: all elements but non-replaced inline elements, table rows, and row groups Inherited: no Percentages: refer to width of containing block Media: visual Computed value: the percentage or 'auto' as specified or the absolute length This property specifies the content width of boxes.
Quirks Mode (All Versions)
The width property does apply to elements that have
the display property set to inline
.
Quirks Mode and IE7 Mode (All Versions)
The width property does apply to elements that have
the display property set to table-row-group
,
table-header-group
, table-footer-group
,
table-row
, table-column-group
,
or table-column
.
V0215:
-
This property does not apply to non-replaced inline elements. The content width of a non-replaced inline element's boxes is that of the rendered content within them (before any relative offset of children).
Quirks Mode (All Versions)
The width property does apply to elements that have
the display property set to inline
.