Re: FW: Do box properties apply to all elements?
Neil Galarneau writes:
> The latest CSS1 doc says that box properties such as margin and border
> apply to "all elements", but the description of the formatting model in
> Chapter 4
> says that "each block-level element ... is surrounded by a box" and only
> explains the box properties in those terms.
> Why, therefore, does the doc state that box properties apply to all
> and what does that mean?
Yes, margin, padding and border do apply to all elements.
- For block-like elements, they work as described by the model of nested
- for `replaced elements' such as images, they put a border around
the image (see last par. of 5.5.1);
- for in-line elements, they put a box around the element, but there
may be several boxes if the element is broken across lines (see last
par. of 5.5.3)
Bert Bos ( W 3 C ) http://www.w3.org/
email@example.com 2004 Rt des Lucioles / BP 93
+33 93 65 77 71 06902 Sophia Antipolis Cedex, France