Archived

This topic is now archived and is closed to further replies.

  • 0

Center nav bar on platform pro

Question

Posted · Report post

Hi guys, im just wondering if you can center the main nav bar in platform pro and if you can whats the css code? Chears Stewart wood www.digitalheavens.co.uk

Share this post


Link to post
Share on other sites

5 answers to this question

Posted · Report post

You can sortof force it to center but it's not very future-proof (i.e., if you add a new menu you have to re-work this css).

#nav ul, #nav .mnav {
	margin:0 0 0 40px;
	width:850px;
	}

Share this post


Link to post
Share on other sites

Posted · Report post

Something along these lines I think would do it

#primary-nav ul {
	float:none;
	margin:0 auto;
	width:500px;
	}

You would need to modify width to adapt to the number of links you have.

Share this post


Link to post
Share on other sites

Posted · Report post

Yep Eduardo's point is better -- remove the float and you can auto-center with the margin property. Still need to be aware of total width but don't have to finagle as much for centering alignment.

#nav ul, #nav .mnav {
	float:none;
	margin:0 auto;
	width:840px;
	}

Share this post


Link to post
Share on other sites

Posted · Report post

That doesn??™t seem to work as I thought :(. The buttons stack on top of each other so I get a vertical bar going up the middle.

Share this post


Link to post
Share on other sites

Posted · Report post

Try this one:

#menu-main-menu ul class.mnav {
	margin:0 auto;
	width:840px;
	}

Share this post


Link to post
Share on other sites