Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

  • #2
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Quote Originally Posted by joelupet View Post
    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 View Post
    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;
    }
    Last edited by Sammy12; 09-13-2012 at 12:50 PM.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •