Grow your CSS skills. Land your dream job.

Multi-level Dropdown Menu

  • # August 26, 2008 at 1:19 pm
    Code:
    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





    I have built a multi-level dropdown menu using this example from the CSS Tricks article (June 24, 2008)
    Dropdown Menu: Start with CSS, Improve with jQuery.

    How do I center the navigation buttons?

    I can center them with padding-left on the ID menu but this may not be the best way to do it, I don’t know.
    Trying to center them by setting id:menu to "text-align: center;" or "margin: 0 auto;" does not seem to
    work. One of the side effects of trying to use "text-align: center;" is that the words in the dropdowns are
    centered and this I do not want.

    I have tested this page in IE7 and FF2 and have dropped the links to the jQuery and js files to increase
    the portability of the code, these seem to only apply if using IE6 and should have no bearing on the
    question of how to center the navigation buttons.

    Al

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".