Our customer would like to see only the top (primary) level of his navigations text to be center aligned. I have tinkered with the CSS to death but just can’t get it to work. Once I center the primary navigational elements, it also centers the sub-navigation. Any help would be appreciated.
Eric links above should show you how its done and the simplest of those methods is to give the nav a width and use auto margins
.dj-mtmenu {
margin: auto;
width: 735px;
}
If you wanted the grey background to be 100% wide then you would need to place that image on the parent div instead.
Of course if the menu is dynamic or has different menus on other pages then you will need to use one of the other more complicated methods such as inline-block.
You might want to give up on float: left if that’s the scenario. And remember that floating an element will make it a block level, so display:block and float:left are doing the same thing to that regard.