Saturday, November 15, 2008

Relationships between display, position, and float

Rule 1:
If 'display' has the value 'none', user agents must ignore 'position' and 'float'. In this case, the element generates no box.

Rule 2:
Otherwise, 'position' has the value 'absolute' or 'fixed', 'display' is set to 'block' and 'float' is set to 'none'. The position of the box will be determined by the 'top', 'right', 'bottom' and 'left' properties and the box's containing block.

Rule 3:
Otherwise, if 'float' has a value other than 'none', 'display' is set to 'block' and the box is floated.

Rule 4:
Otherwise, the remaining 'display' properties apply as specified.

http://dbaron.org/css/test/sec0907

No comments: