Jump to content

Recommended Posts



I've downloaded a template and I'm now editing it in Dreamweaver. I am trying to center the top navigation menu, and from some reason I can't do it. Please see attached screen shot of the style sheet. Any advice would be helpful.


Many thanks




Link to post
Share on other sites

It's probably because the elements inside are floated to the left.


If you remove the float rule from the menu items, set their display to inline-block and at the text-align property of the parent to "center" it probably will work.

Link to post
Share on other sites

at the moment it looks like that:

/* Top Nav */

.top-nav li a, .background-white .top-nav li a {
color: #002633;
font-size: 0.9em;
padding: 0.7em 1.25em;
nav {
border-bottom: 4px solid rgba(0, 0, 0, 0.05);
border-top: 1px solid rgba(0, 0, 0, 0.05);
padding: 1.7em 0;
position: inline-block;
z-index: 2;
Link to post
Share on other sites

Set the display property (not position) of the list items to "inline-block". Then set the text-align property of their container (probably .top-nav) to "center".

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...