W3C home > Mailing lists > Public > www-style@w3.org > July 2008

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 03 Jul 2008 09:51:34 -0700
Message-ID: <486D0396.6020008@inkedblade.net>
To: Francois Remy <fremycompany_pub@yahoo.fr>
CC: CSS 3 W3C Group <www-style@w3.org>

Francois Remy wrote:
> Hello,
> 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 ?
>  >> IE a,d Opera say "yes" (I think this is what developers want)
>  >> Firefox and Safari say "no" (I think this is wat the spec want)
> Test Code :
> ==========
> A<br style="line-height: 1px;" /><!-- Normal line size -->
> <br  style="line-height: 1px;" /><!-- Line of 1px ? -->
> <br style="line-height: 1px;" />B<!-- Normal line size -->
> What's the good answer ? Should that not appear in the spec ?

Depends on how "special" the <br> element is. If it's treated as
a regular inline element that contains a preserved line break,
then line-height on <br> should affect the height of the line.

Received on Thursday, 3 July 2008 16:52:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT