CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   [help] Centering Footer Menu (http://www.codingforums.com/showthread.php?t=273005)

joelupet 09-13-2012 08:18 AM

[help] Centering Footer Menu
 
First of all, I am not a Webdev and I need your help. By the way here is a preview of some coding http://jsfiddle.net/joelupet/9NKzU/.

I would like to see my menu centered. Also, if there is alternative way like add id$class to UL elements structure.

Thanks and hoping for your response.

Sammy12 09-13-2012 12:47 PM

Quote:

Originally Posted by joelupet (Post 1269593)
Also, if there is alternative way like add id$class to UL elements structure.

You would set the id and/or class in the HTML:

Code:

<ul id="mainNav" class="nav">
    ...
</ul>

Then target them in your CSS:

Code:

ul {
  ...
}
.nav {
    ...
}
ul.nav {
    ...
}
#mainNav {
    ...
}
#mainNav.nav {
    ...
}

Quote:

Originally Posted by joelupet (Post 1269593)
I would like to see my menu centered.

How can it be centered if it has a width of 100%? You would have to decrease that width and use margin: 0 auto;

Code:

#footer_menu ul{
    width:100%; /* reduce */
    margin: 0 auto; /* add */
    overflow:hidden;
    background-color:red;
}



All times are GMT +1. The time now is 01:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.