Jump to content
Killersites Forums

Centering the navigation


harryd
 Share

Recommended Posts

How do I center the navigation.

I read some tutorials and I still could not find the answer.

 

#navigation ul

{

padding-left: 0;

margin-left: 0;

color: #000000;

float: left;

width: 100%;

font-family: arial, helvetica, sans-serif;

font-size:14px;

border-top-style:none;

border-right-style: none;

border-bottom-style: none;

border-left-style: none;

background-color: #BAFF75;

}

 

#navigation ul li {

display: inline;

color: #000000;

background-color: #BAFF75;

}

 

Home

Contact Us

Upcoming Shows

About Us

 

Thanks again

HD

Link to comment
Share on other sites

Your style for #navigation ul has width: 100% and float: left so it will always be 100% wide starting from the left. Make it a suitable width and add margin: auto; to make the side margins equal and flexible.

{

padding-left: 0;

margin: auto;

color: #000000;

/*float: left;*/

width: 700px;/*whatever is needed*/....................

Link to comment
Share on other sites

The advice I gave is the normal way of centering a div which doesn't have position: absolute; if it doesn't work in your case then there must be something in another style affecting it.

 

We need to see your whole page online and be able to download it all and test, including images and css files.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
 Share

×
×
  • Create New...