The best way to vertical align texts in list items in the center???

Discussion in 'CSS' started by cre8ive, Jan 17, 2008.

  1. #1
    The best way to vertical align texts in list items in the center???

    I want to (and kind of need to) vertical align texts in list items in the center while the height (20px, 30px, 40px, etc.) is fixed. Using vertical-align does not seem to work (Why?). So, how can I do this? Also what's the best way to do this?
     
    cre8ive, Jan 17, 2008 IP
  2. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Vertical align should be used on inline elements (inputs, buttons, etc) in regards to the block level element that holds them.

    For vertically aligning text that's directly in a block level element, I would suggest line-height.
     
    soulscratch, Jan 17, 2008 IP