Centering a CSS horizntal nav bar...

User 2460601 Photo


Registered User
8 posts

Ok, so I've created a horizontal menu, went through the help file that tells me how to center it, which makes sense. But, when I actually use the code, it won't center as it is supposed to. I tried to create a simple horizontal menu with 1 root and to siblings.

I then went back and added the following to the CSS file (which is according to the help document)

.center {margin-left:auto; margin-right:auto;}

and the following in the HTML page just before the "ul" statement (yes there is a link to the external style sheet present).

<div class="center">

and
</div>
after the </ul> close statement

It appears that something is overriding it, but I can't quite figure out what it is. Any thoughts on what I should look for?
User 2073552 Photo


Registered User
1,625 posts

Take a look here... http://helpsite.sirage.com/stream.html

This may help you. :P
"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 2733 Photo


Ambassador
426 posts

It would be easier to help you, if you included a link to the page in question.
Let's not get all hurt.

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.