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

Re: Line layout in browsers

From: Eric A. Meyer <eric@meyerweb.com>
Date: Mon, 21 Jan 2008 16:24:44 -0500
Message-Id: <a06240800c3babda0e4dd@[192.168.1.200]>
To: www-style@w3.org

At 2:38 PM -0600 1/21/08, David Hyatt wrote:

>Borders increase the span height (as does padding).  If you put 1px 
>top and bottom borders on a span in an attempt to "see where it is", 
>then you just made a span box that is 2px taller.  Therefore at a 
>line-height of 1 (100px), there will be a slight overlap since the 
>span boxes are a bit taller than the height of the line (102px).

    Agreed.  In the case we were discussing, though-- the first test 
on 
<http://meyerweb.com/eric/css/tests/line-height/bigtext-spans.html>-- 
there is no padding on the spans, and at 'line-height: 1' there's a 
more than a few pixels of overlap in Safari and IE.

-- 
Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/
Received on Monday, 21 January 2008 21:25:08 GMT

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