SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict lundberg's Avatar
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Making text be in the middle of the div?

    Hi,

    I have a div that is 21px high and i want my text to be shown in the middle. (not in the center of the width but the middle of the height)

    i tried this: vertical-align: middle;

    but it doesn't seem to work =/

    What should i do?

    Martin Lundberg
    Sweden

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 11px;
    Should center it exactly in the middle.

  3. #3
    SitePoint Addict lundberg's Avatar
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okey, thanks! =) Worked!

    Martin Lundberg
    Sweden


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •