Jump to content
Sign in to follow this  
rpacker

How to center align the navigation menu

Recommended Posts

rpacker

I am still trying to find an answer to what I think must be a simple problem, center alignment of the navigation menu. I have tried all sorts of custom css but nothing works. Here is the page, the menu is at the top: http://www.thepostreality.com/greetings/


Randall Packer

Multimedia Artist & Educator

http://www.randallpacker.com

Share this post


Link to post
Share on other sites
Simon
[code] #primary-nav { margin-left: 25px; } [/code]

Share this post


Link to post
Share on other sites
rpacker
That doesn't work because I have two rows of menu items that need to literally be centered within the margins. Is there a "center" alignment or even "none" alignment indicator? I have tried everything!

Randall Packer

Multimedia Artist & Educator

http://www.randallpacker.com

Share this post


Link to post
Share on other sites
Simon
If you make all the words the same length then yes. [code] #menu-item-111 { margin-left: 15px; } #primary-nav { margin-left: 25px; } [/code] item 111 is the first one on the second row...moving it to the right pushes them all over, you'll have to just experiment.

Share this post


Link to post
Share on other sites
rpacker
A simple solution, but if it is the only way to do it, well then, bravo! How did you so quickly figure out how many pixels to push each line over. It came out perfect! I will need to adjust this occasionally as I change the menu items.

Randall Packer

Multimedia Artist & Educator

http://www.randallpacker.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×