Justified navigation buttons

Posted by Kaivosukeltaja on Stack Overflow See other posts from Stack Overflow or by Kaivosukeltaja
Published on 2010-04-04T08:48:16Z Indexed on 2010/04/04 8:53 UTC
Read the original article Hit count: 416

Filed under:
|
|

I'm trying to create the primary navigation menu for a website that will have a variable amount of primary menu items. The navigation bar is horizontal and has a width of 738px. I would like to have the leftmost item 18px from the left and the rightmost item 18px from the right edge of the element, with the other menu items spread evenly between them. I'm using a tableless layout.

So far I haven't been able to make it work exactly like I want. Setting margin: auto doesn't seem to help, and I can't keep the 18px margin on both sides using a table. One idea was to use text-align: justify but it doesn't justify single lines.

Is there a simple or less simple way of doing this, or am I going to have to ask the AD to relax his visual requirements?

© Stack Overflow or respective owner

Related posts about css

Related posts about html