SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Width of navigation cells

    Hi,

    Would anyone know of a better way to make each of my four navigation cells for my horizontal navigation be the same width? I have tried setting the width in CSS which does work but it screws with the rest of my table table layout. I attempted setting the width in each cell, again, basically the same result. It seems as if I leave width undefined it works better, the cell (s) width are based on the text of the link. I also tried nesting the navigation but that didn't seem to really help. Anyone with an idea I would appreciate a heads up. I'm fine with the design, just looking for a possible cure to my navigation.

    http://midwestwebdesign.net/bloodbrothers/

    Thanks,
    Ryan Butler

    Midwest Web Design

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an unordered list instead of a table. Fix the width with css and float each li left. This is the 'modern' way of doing it. Tables are not for layout - they're for tabular data. Please read the article in my sig.

  3. #3
    SitePoint Guru puco's Avatar
    Join Date
    Feb 2005
    Location
    Slovakia
    Posts
    785
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or if you want to stick to the tables you should set table-layout: fixed and set the widths to the value you want. You can also set all widths using CSS or COLGROUP/COL element.
    Martin Pernecky

  4. #4
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies. Still can't get this stupid nav table to fit in to the rest of the design. Has to be something simple.
    Ryan Butler

    Midwest Web Design

  5. #5
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I'm stupid. It was the cellpadding of my main table causing the foul up. Need to compensate for that somehow. Thanks again.
    Ryan Butler

    Midwest Web Design


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
  •