HTML and CSS Reference
In-Depth Information
A special case is run-inboxes, defined by display: run-in , which can generate either a
block or an inline box depending on the situation. The rules that decide the outcome are:
1. If the run-in itself contains a block box, the run-in generates a block box.
2. If that's not the case, and the run-in is immediately followed by a sibling block box that
is neither floated nor absolutely positioned, the run-in box becomes the first inline box of
the sibling block box.
3. If neither condition applies, the run-in generates a block box.
In the case where a run-in is inserted as the first inline of its sibling block box (rule 2 above),
it does notinherit property values from that block box. Instead, it continues to inherit from its
structural parent element. Thus, if the sibling block box has color: green applied to it, the
green will not be inherited by the run-in element even though it is visually a part of the block
Search WWH ::

Custom Search