This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2004 > inline elements with background-color taller than text height in moz: how?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author inline elements with background-color taller than text height in moz: how?
Lucas

2004-11-19, 12:18 pm

I want this to render in Mozilla:

<span style="height:2em;background-color:green">Blah</span>

showing the background color to be actually 2em tall, not 1em. And yes
I need it to be inline. I've tried everything I can think of, setting
line-height, using <li style="display:inline">, etc etc etc but
nothing seems to work.

Works okay in IE. Can anyone tell me how to do this in Mozilla?

Thx,
Lucas
Spartanicus

2004-11-21, 11:18 pm

lucas@krispware.com (Lucas) wrote:

>I want this to render in Mozilla:
>
><span style="height:2em;background-color:green">Blah</span>
>
>showing the background color to be actually 2em tall, not 1em. And yes
>I need it to be inline. I've tried everything I can think of, setting
>line-height, using <li style="display:inline">, etc etc etc but
>nothing seems to work.


10.5 Content height: the 'height' property
'height'
Value: <length> | <percentage> | auto | inherit
Initial: auto
Applies to: all elements but non-replaced inline elements, table
columns, and column groups
http://www.w3.org/TR/CSS21/visudet....height-property

--
Spartanicus
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews