number with a background...

liunx

Guest
Hi There.

I'm trying to have a span with a grey background and a number in it.
The thing is that I want the background to be in the exact size of the font. Here's what I got so far but it's not working.

<span style="margin: 0; background: #d5d5d3; text-align: left; float: right; font-size: 94px; color: #fff; font-weight: 700; font-family: Times;">10</span>

How can I do it?

Thanks!apply a line height:

<span style="margin: 0; padding: 0; background: #d5d5d3; text-align: left; float: right; font: 700 6em/.66em Times; color: #fff;">10</span>

I also combined the font attributes together, changed the px to em and put padding: 0;!np
 
Back
Top