CSS - space around text

Discussion in 'HTML' started by Matthew Superstar Swass, Oct 5, 2003.

  1. 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>


    ---------------------------------------------
    *S
     
    Matthew Superstar Swass, Oct 5, 2003
    #1
    1. Advertising

  2. Matthew Superstar Swass

    Richard Guest

    Matthew wrote:

    > 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.
     
    Richard, Oct 5, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,914
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,679
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    1,026
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    730
    Michael Hudson
    Oct 24, 2003
  5. Piet
    Replies:
    0
    Views:
    550
Loading...

Share This Page