W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Inline h*ll

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Fri, 04 Feb 2000 13:53:35 -0800
Message-ID: <389B4A5E.46F0@yahoo.com>
To: www-style@w3.org
> Re: Inline h*ll
> 
> From: Ian Hickson (py8ieh@bath.ac.uk)
> >> Nothing normative, at any rate. You can treat BR as an empty inline
> >> element with this style:
> >>
> >>    BR:before {
> >>       content: '\A';
> >>       white-space: pre;
> >>    }
> > It could equally well be done as BR:after, thereby causing drastically
> > different results, which demonstrates why it isn't a good idea to
> > treat it in this manner at all.
> 
> Why different results? Since there is no content (it is an empty element),
> the :before and :after pseudo-elements would have basically the same
> effect.

BR:before gives:
<-|
BR

BR:after gives:
BR<--|

so in the first case

P {line-height: 10px}
SPAN.insideP {font-size: 100px}
<P>
<SPAN>The content<BR>
is here
</SPAN>
</P>

Given BR:after, only one line's height is distorted, but with BR:before,
two are.
Received on Friday, 4 February 2000 08:51:59 GMT

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