September 2004
Intermediate to advanced
712 pages
24h 45m
English
In contrast to inline elements, an element set to display:block is separated from its
siblings, generally by a line break. For example, in HTML,
paragraphs and headings are block elements. In Examples Example 13-1 and Example 13-2, the dish, directions, and story elements were all formatted with
display:block.
CSS 2.1 adds an inline-block value that formats the
element’s contents as if it were a block-level element, but formats
the element itself as if it were an inline element. This normally
just means there’s extra margins and padding around the element’s
content, but no line breaks before or after it.