Hi Georg,

Close, but this poses bit of layout issue surrounding the text.
This is what I'm trying to achieve: http://hellobenlau.net/wsg/eg.gif
So there'll be a div with padding top and bottom of 20px, and with text
inside. If I do:

<div style="padding:20px 0">
   <p>some text</p>
</div>

The gap would include both the padding and the anonymous inline boxes
(thanks Russ), which works out to be >20px. Could there perhaps be a way to
calculate the amount of white-space for these anonymous inline boxes?

I'm not trying to achieve exact look across all browsers, I understand it's
impossible. But I'm trying to achieve to make it look like the design at
least.. in 1 browser (just so my designers are happy).

Thanks.
Ben

On Thu, Jul 2, 2009 at 10:34 AM, Gunlaug Sørtun <gunla...@c2i.net> wrote:

> Ben Lau wrote:
>
>  http://www.hellobenlau.net/wsg/index.html
>>
>> I'm wondering if there was a way to top align the text to its line-height.
>> So say, with text size 20px, could the top of the 'T' be
>> aligned to the top of the pink box?
>>
>
> Is this what you want?
> <http://www.gunlaug.no/tos/alien/bl/test_09_0702.html>
>
> Note that you can't really get "pixel perfect" alignment across
> browser-land, as there will always be some em-to-pixel rounding deviation.
>
>        Georg
> --
> http://www.gunlaug.no
>
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************
>
>

[]


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to