CSS horizontal navigation bar spacing question
February 13, 2005 10:34 PM
Subscribe
Can CSS be used to transform an unordered list of links into a horizontal navigation bar which occupies a fixed (total) width but has equidistant padding between each link, regardless of content length?
( css layout tooth-grinding insanity )
Semantically, a navigation bar is a list of links and should therefore be rendered using <ul>. As such, I am attempting to produce an unordered list that occupies a fixed width (i.e. 450px) but want the padding between each list item to be equal. The padding also needs to be variable, because the text of each link might change, so fixed-width <li>s will not suffice.
Figure 01, List of links sans padding
Figure 02, List of links with equidistant padding x
Any ideas how this might be accomplished? The most irritating part is that I can achieve the desired effect in two minutes using a table.
posted by Danelope to computers & internet (9 comments total)
posted by willnot at 10:40 PM on February 13, 2005