Hi,
I'm new here, but I'm not new to CSS.
I would like to make a text with a background.
That background has to be exactly 2 pxs (one at the top and one at the bottom) larger than the text.
Using Arial at 8 pts, the background is 4 px (so 2 at the top, 2 at the bottom) high.
How can I lower these dimensions ?
How to specify text background dimensions
You could probably use padding or maybe line-height.
The real problem is we do not know in what context you are talking about - for example is it for all text on one line, or is it for some text in the middle of other text.
Regards
Day
BTW your font should be in PX as well unless this is for printing purposes.
0.75pt = 1px
so 8pt = 11px approx
How to specify text background dimensions
Thank you very much...
Line height did the trick !
Result:
Now, why should the font be in pixel format ?
How to specify text background dimensions
Now, why should the font be in pixel format ?
Because it may mean you will get some strange results from different browsers.
PX is for screen viewing
PT is for printing
Regards
Day