Re: The <br> tag and the line-height CSS attribute.

Francois Remy wrote:

> I'm recontacting you because I've detected, a long time ago, a thing 
> that seems to be not clear in the CSS Specs.
>  
> When you have a <BR> that's alone on a line and when you apply a 
> line-height attribute to it, should the line that he occupes change of 
> height ?

Conceptually, the typical browser style sheet implements BR *elements* 
by generating a newline character as generated content.  The answer, 
therefore, depends on whether that character is conceptually on the 
first or second line.  Conventionally newline is associated with the old 
line, so I think the lineheight probably should affect the old line.

Note that it is the generated newline that produces the BR effect, so, 
for a browser that actually uses CSS for BR, this applies to any use of 
generated newlines in inline elements, and it only applies to BR to the 
extent that its generated content is not overridden.

Incidentally, the HTML specification doesn't require <br><br> to take 
any space at all, and I believe, that, historically, that (i.e. the 
TeX/troff interpretation) was the original behaviour.  Only with the 
advent of GUI browser did its meaning drift to the WYSWYG hard newline 
concept.  The specification is still ambiguous, so both are probably 
valid.  A such, it is safer to a PRE element (with the default 
whitespace:pre style) to force newlines.

PS your mail has a suspicious, and irrelevant, application/octet stream 
(binary with no explicit type) attachment.  File content sniffing 
indicates that it is actually JPEG, but browsers should not make that 
inference, even though IE does.



-- 
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.

Received on Friday, 27 June 2008 08:09:04 UTC