Center my navigational menu?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
How can I center my navigational menu? My style is CleanSlate
Photo of Extreme Entertainment

Extreme Entertainment

  • 1 Post
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Stefan

Stefan, Official Rep

  • 4448 Posts
  • 190 Reply Likes
Hello Extreme Entertainment

I'm afraid that the navigation menu of the Clean Slate cannot really be centered. The reason is that it could only be achieved by editing the Site CSS code, and the code which changes the alignment for the menu can only be set to "left" or "right". To get your menu in the middle, you would need to work with margin values. However, it then depends on the number of links in your menu what margin you need to set, so you would need to constantly adapt this when changing the number of your menu links.

That's why I'd like to suggest you this alternative option: Change your Style Template to one of our Recommended Styles, such as Skyline or Super Flat. With Super Flat, you can create the exactly same Style as with CleanSlate, and you'll even have many more options to customize your Style without coding, but by using our convenient Style Designer, including centering your navigation menu.

If you need any assistance with this, please let us know, and we'll be happy to help.
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
There is CSS for centering blocks without the need to determine margin values by using the "auto" value as that margin value.

div.center {

margin-left: auto;
margin-right: auto;
width: 8em;
}

And this is the HTML that applies to:

<div class="center">(Whatever content)</div>


Ref: http://webdesign.about.com/od/beginni...
Photo of grols

grols

  • 10 Posts
  • 1 Reply Like
See if this works:

.Menu ul {
top:0px;
margin:0px;
padding:0px;
margin-left: auto;
margin-right: auto;
}