CSS - space around text

  • Thread starter Matthew Superstar Swass
  • Start date
M

Matthew Superstar Swass

I've got a DIV that needs to hug a 400pt letter (the number 1 actually).

So I've got line-height:365px and that's close enough, but what do I do about
the space on the sides?

If I change it from 1 to a letter, there is little space on the sides. That
space is just there with a number.

Quick example...

#test
position: absolute;
font-size: 400pt;
border: 1 dotted;
line-height: 365px;

<DIV id=test>1</DIV>
 
R

Richard

Matthew said:
I've got a DIV that needs to hug a 400pt letter (the number 1
actually).
So I've got line-height:365px and that's close enough, but what do I
do about
the space on the sides?
If I change it from 1 to a letter, there is little space on the sides.
That
space is just there with a number.

Simple. Padding-left:10px; padding-right-10px;
This creates an edge effect on the sides instead of the text butting up
against it.
400pt? You couldn't even see the damn thing on a screen!
letter-spacing:2px; could be used to adjust distance between letters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top