Jump to content
Sign in to follow this  
gyoery

Centering Menu Items (li) within (ul)

Recommended Posts

gyoery

I am trying to "center" the menu within the ul that is surrounding it. Kinda like here: http://css.maxdesign.com.au/listutorial/horizontal_master.htm This doesnt work, since the items are floated. I removed the float and added a display inline, but it just won't work. The menu should be centered within the area next to the searchbox. giving it a left and right padding/margin is not a solution, cause it has to work with any menu items.

Share this post


Link to post
Share on other sites
Rob
Have you tried changing the selectors for that code snippet to match what's on your site? I looked at the site URL and the menu's been aligned vertically, so I can't even test it and give you some ideas.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Jenny
Try using this, or a variation of it.. [code]#primary-nav ul.main-nav { text-align: center; } ul.sf-menu li { float: none; display: inline-block; }[/code]

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
gyoery
Jay... it worked.. no idea what I did wrong.. anyway, thanx for this real, substantial, valuable, proper, and helpful answer... I appreciate it.

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  

×