The Relationship Between display, position, and float

The three properties display, float, and position interact in certain ways.

If an element’s display property is set to none, no box is generated. In this case, float and position are ignored.

If an element’s position property is set to absolute or fixed, it’s absolutely positioned. In this case, float is ignored (the computed value is none).

For absolutely positioned elements, floated elements (elements whose float property is set to left or right), and the root element, the computed value for display is set according to Table 1.

Otherwise, the computed value for display is the same as the specified value.

Table 1. Computed Display Values
Specified Value Computed Value
inline, inline-block, run-in, table-caption, table-cell, table-column, table-column-group, table-footer-group, table-header-group, table-row, or table-row-group block
inline-table, table
other as specified

User-contributed notes

by mattymcg
Thu, 31 Jan 2008 23:20:59 GMT

The value "inline-table" should have no comma after it.

Related Products