Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

A _centred_ 3 tier menu

  • 03-12-2008 12:38AM
    #1
    Registered Users, Registered Users 2 Posts: 383 ✭✭


    I am having sooo much trouble finding a 3 tier horizontal (drop down) menu, that can be centered.

    I can find many different examples, but all have the same problem. They are left aligned.

    Take this one for example, it is perfect, except that it is left aligned. I know you could set a predetermined width and then use another div with margin-right: auto and margin-left: auto to have it centered. But the problem is you have to hard code the width of the menu.

    I want to use this style menu for secondary navigation. The thing is that each page will have different top tier menu elements, some pages will only have 1 menu option others could have 20 (across different tiers). Thus hard coding the css width is not going to work (unless I use the style attribute on each page to set a custom width -messy).

    There is two pints of beer for any one who can point out a nice CSS based 3 tier menu that is centered and can gracefully handle varying number of (top level) elements!:)

    Thanks in advance.


Comments

  • Registered Users, Registered Users 2 Posts: 2,119 ✭✭✭p


    I'm going to go out on a limb here and say that if you need a 3-tiered menu, then you probably need to reconsider your site structure itself.


Advertisement