Jump to content
Sign in to follow this  
salesdigitalheavenscouk

Center nav bar on platform pro

Recommended Posts

salesdigitalheavenscouk    0
salesdigitalheavenscouk

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
cmlstudios    0
cmlstudios

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
nett-ed    0
nett-ed

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
cmlstudios    0
cmlstudios

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
salesdigitalheavenscouk    0
salesdigitalheavenscouk

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

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  

×