PDA

View Full Version : Resolved All Levels Navigational Menu: Align center on page



dropdown
12-22-2008, 07:43 PM
1) Script Title:
All Levels Navigational Menu:

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/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,

Nile
12-22-2008, 10:33 PM
Try adding this to .mattblackmenu ul:


margin: 0 auto; // Centers

ddadmin
12-22-2008, 10:40 PM
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 (http://www.dynamicdrive.com/style/csslibrary/item/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.

dropdown
12-23-2008, 12:17 AM
Try adding this to .mattblackmenu ul:


margin: 0 auto; // Centers


Thanks for helping. I tried the above code but didn't work.
Any other ideas?

dropdown
12-23-2008, 12:24 AM
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 (http://www.dynamicdrive.com/style/csslibrary/item/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).