• Hi, I am trying to centre a nav menu in my header but cant seem to stop it from sitting on the left, can anyone see why? here is what I hope is the relevent bit of code:

    #nav            { margin-right: auto; margin-left: auto; width: 990px; height: 60px; padding-top: 30px; padding-bottom: 2px; border-bottom: 1px solid #fff }
    #nav li      { list-style: none; margin-bottom: 30px;float: left }
    #nav li a          { color: #fff; font-size: 150%; font-weight: 450; text-transform: uppercase; z-index: 999 }
    #nav li a:hover     { color: #fff; text-decoration: none; z-index: 999; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80) }
    
    #nav .parent > a, #nav .parent > a:hover{ background: #fff; background-position:right;background-repeat:no-repeat; z-index: 999;}
    #nav ul, #nav ul li{display:inline;list-style:none;padding:0;margin:0}
    #nav ul li a{display:inline-block; text-decoration:none; padding: 0px 0px 0px 0px; z-index: 999;}
    #nav ul li a:hover {  }
    #nav ul #first a:hover{border-radius:5px 0 0 5px; z-index: 999;}
    #nav ul li{position:relative}
    #nav li ul { display: none; position: absolute; top: 51px; left: 11px; z-index: 999; }
    #nav li ul a   {  z-index: 999; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); opacity: .8 }
    #nav ul ul li:hover ul, #nav ul ul ul li:hover ul { left: 0 }
    #nav ul li:hover ul{display:inline-block}
    #nav ul ul, #nav ul li:hover ul ul, #nav ul ul li:hover ul ul {}
    #nav ul ul ul li { margin-top: -14px; }
    #nav ul li:hover ul, #nav ul ul li:hover ul, #nav ul ul ul li:hover ul { display:block; z-index: 999;}
    #nav ul li:hover ul li a, #nav ul ul li:hover ul li a, #nav ul ul ul li:hover ul li a{ margin:-1px 0 0 -11px}
    #nav ul li:hover ul li a { padding: 5px 14px 15px; width: 150px }
    #nav ul ul li:hover ul li a {  }
    #nav ul ul ul li:hover ul li a{width:140px;padding:0 14px 0 24px}
    #nav .children li a:hover     { color: #fff; background-image: none }

    I should say I am also adding the custom background images to each label by injecting them in the menus/custom links/label box as you will see on my site

    https://www.fnordcorps.com

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Centering Nav menu in header’ is closed to new replies.