Re: CSS and Eccentric Poems.
Scott E. Preece writes:
> From: Carl Johan Berglund <firstname.lastname@example.org>
> | Bert Bos wrote:
> | > This spacing is indeed too irregular for CSS1. Some sort of mark-up
> | > has to be in the HTML; a <SPAN> seems logical, but a <BR> would work
> | > as well, and is shorter to type:-)...
> | > spring<br class=gap1>when the world is mud-<br>
> | > luscious the little<br>
> | > lame baloonman
> | The problem here is that <br> is not a container--there is
> | no </br> tag, so there is no content of the <br> that can
> | be styled in any way. But setting the space between paragraphs
> | to zero (as proposed) means you can do it with <p>.
> The standard appears to be ambiguous here. The box formatting model is only
> defined to apply to block-level elements and the WIDTH property is in
> the "box properties" section of the standard, but it says explicitly
> that it can be applied to "text elements," which doesn't seem to be
> defined in either in CSS or in HTML 2.0. So I don't think you could
> count on being able to use DISPLAY=INLINE and WIDTH on BR (since setting
> DISPLAY to other than BLOCK may disable box properties).
From the May 5 draft
Value: <length> | <percentage> | auto
Applies to: all elements
Percentage values: refer to parent's width
This property can be applied to text elements, but it is most useful
with inline images and similar insertions.
See the formatting model (section 4) for a description of the
relationship between this property and the margin and padding.
The definition of the `width' property states that it applies to *all
elements*. The text further on indeed refers to the box formatting
model, but it also gives as example that it can be applied to an
The phrase `text element' is not formally defined; `text' is only used
here to contrast with `image' in the same line.
> I'm not sure whether P will work or not - at one point I understood the
> formatting model to not support run-in text, implying that P had to
> force a new line (at least if it's doing DISPLAY=BLOCK, which it has to
> in order to assume WIDTH will work, as above).
CSS1 doesn't support run-in text (except by using float:left, which
sometimes gives the same effect...). But the example can be made to
work with P instead of BR as well (it's harder, but it's possible. Any
> The worse problem is that the standard allows the DISPLAY attribute to
> be hardcoded by the browser, so either P or BR could fail to
> work as expected. So it may not be possible to do reliable intra-line
> spacing using the properties in CSS1 after all.
The current draft warns users for incorrect implementations. I don't
think it *allows* such implementations. The warning had its place when
CSS1 was being developed, but as it is getting closer to its final
form, the text should maybe be removed.
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