Results 1 to 5 of 5

Thread: All Levels Navigational Menu: Align center on page

  1. #1
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default All Levels Navigational Menu: Align center on page

    1) Script Title:
    All Levels Navigational Menu:

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem:
    I'd like to change the alignment of the entire drop down to page center. I've tried changing "float" but it won't accept center and only accepts "left" or "right".

    What CSS setting do I need to change to align the menu bar canter.

    Thanks,
    Last edited by dropdown; 12-22-2008 at 11:38 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try adding this to .mattblackmenu ul:
    Code:
    margin: 0 auto; // Centers
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    dropdown (12-22-2008)

  4. #3
    Join Date
    Aug 2004
    Posts
    9,890
    Thanks
    3
    Thanked 964 Times in 953 Posts
    Blog Entries
    15

    Default

    CSS "float" only accepts "left" or "right". To answer your question, the solution basically involves modifying the CSS for the top menu bar ("ddlevelsmenu-topbar.css") so it no longer uses "float" to render its look. For example, you can ry replacing the CSS within topbar.css with one such as Chrome Menu Bar, which doesn't use float and allows easy centering.

    In the next couple of weeks I'll release a wizard that lets you choose from a handful of top menu bar designs to be used with All Levels Menu, some of which support easy centering.
    DD Admin

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    dropdown (12-22-2008)

  6. #4
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Nile View Post
    Try adding this to .mattblackmenu ul:
    Code:
    margin: 0 auto; // Centers
    Thanks for helping. I tried the above code but didn't work.
    Any other ideas?

  7. #5
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    CSS "float" only accepts "left" or "right". To answer your question, the solution basically involves modifying the CSS for the top menu bar ("ddlevelsmenu-topbar.css") so it no longer uses "float" to render its look. For example, you can ry replacing the CSS within topbar.css with one such as Chrome Menu Bar, which doesn't use float and allows easy centering.

    In the next couple of weeks I'll release a wizard that lets you choose from a handful of top menu bar designs to be used with All Levels Menu, some of which support easy centering.
    Correction:

    Got it to work by removing some of the other lines and adding "text-align: center;" (from Chrome Menu Bar).
    Last edited by dropdown; 12-22-2008 at 11:39 PM.

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
  •