Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2011
    Posts
    40
    Member #
    26969
    Liked
    1 times
    Can anyone advise me how to center the links/buttons in my navigation menu? See: www.circus11.com/wordpress

    Code:
    /* =Menu
    ----------------------------------------------- */
    
    #access {
        display: block;
        float: left;
        margin: 0 auto;
        width: 100%;
        background-color:#000;
    }
    #access ul {
        font-family: 'KorolevBold', Arial, sans-serif;
        font-size: 14px;
        font-weight: normal;
        list-style: none;
        margin: 0;
        padding-left: 0;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    #access li {
        float: left;
        position: relative;
    }
    #access a {
        color: #fff;
        background: #000;
        display: block;
        line-height: 2em;
        padding: 0.3em 1.5em 0;
        text-decoration: none;
    }
    #access ul ul {
        -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
        -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
        box-shadow: 0 3px 3px rgba(0,0,0,0.2);
        display: none;
        float: left;
        font-weight: bold;
        position: absolute;
        top: 29px;
        left: 0;
        text-transform: none;
        z-index: 99999;
        width: 160px;
    }
    #access ul ul ul {
        left: 100%;
        top: 0;
    }
    #access ul ul a {
        font-family: 'KorolevBold', Arial, sans-serif;
        font-size: 14px;
        font-weight: normal;
        background: #000;
        color: #fff;
        line-height: 1em;
        margin: 0;
        padding: .66em .5em .5em 1em;
        min-width: 160px;
        height: auto;
    }
    #access li:hover > a,
    #access ul ul :hover > a {
        background: #000;
        color: #FF0099;
    }
    #access ul ul a:hover {
        background: #000;
    }
    #access ul li:hover > ul {
        display: block;
    }
    #access .current_page_item a {
        background: #000;
        color: #FF0099;
    }

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Maybe it's my old eyes, but they look centered to me...
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Same here.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    They had changed it before you looked. The solution for those who wish to know, is:

    Code:
    #access li {
    display: inline-block;
    position: relative;
    }
    To instead of using float: left, use display: inline (block if you like, though might get stair-casing in IE?). Then throw a :

    Code:
    text-align: center;
    on your container UL.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:56 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com