centering a nav menu - Post ID 199308

User 2460601 Photo


Registered User
8 posts

I've tried over and over again to create a centered horizontal navigation menu using your suggestions in the CSS menu designer, but it does not shift it at all. I even created a simple menu to see if it might be something I did, but it yielded the same results....no shift. It appears that something is not quite right with the help file. I basically started from scratch and created a blank HTML document in HTML editor, then created my nav menu and altered it according to the help file, but it still did not shift it. I need to make sure the help file is correct before I give up on the CSS menu creator and create one from scratch.

I've even tried a suggestion from an advisor, but that also didn't seem to work.
User 2073552 Photo


Registered User
1,625 posts

Can we get a link to the page you are working on?
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 187934 Photo


Senior Advisor
20,266 posts
Online Now

The .center class width depends on your menu width.:)
CSS

.wrapper{
width:100%px;
margin-left:auto;
margin-right:auto;
}

.center {
width:250px;
margin-left:auto;
margin-right:auto;
}


HTML

<div class="wrapper">
<div class="center">
<ul class="menu-menu">
<li class="first"><a href="http://">Untitled1</a></li>
<li><a href="http://">Untitled2</a></li>
</ul>
</div>
</div>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.