Vertical-align: center;

Discussion in 'HTML & Website Design' started by andytford, Aug 18, 2006.

  1. #1
    I have not been able to find, or figure out, an ideal solution - but am hopeful one exists.

    http://www.imxstudio.com/AdvancED/StyleSheet/test.html

    In the global nav area (Home, About Us, School/District Locator...), I need the links (or li's) to align vertically in the center. A few of the links wrap and create two lines of text - which poses the biggest problem.

    Is there any way to get all of these elements to vertical align center? Ideally, I'd like to not have to hack, if possible.

    Thanks in advance ~
     
    andytford, Aug 18, 2006 IP
  2. Carlito

    Carlito Peon

    Messages:
    679
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1) If you want their tops to line up, do something like:
    #globalnav { padding-top: 8px; }

    2) If you want them all to center themselves independently I would wrap each in a table with valign="middle".
    Or are you one of those hardcore CSS guys that think tables are the devil's work? :)
     
    Carlito, Aug 18, 2006 IP
  3. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #3
    I looked at it my default resolution (800x600) then changed to 1024x768 and the size of your window did change.

    Setting your divs to 100% and not to pixels may work. Personally I would suggest shorter titles with maybe the full title in pop-up when hovering. Like when you hover over a thread here at DP.

    I could not score a hit on your stylesheet or I would try to point you to the right spot.
     
    Colbyt, Aug 18, 2006 IP