Support » Theme: Oxygen » Center Primary top menu

  • Hi
    I tried to center top menu but so far no luck, will appreciate any help, below is actual code,
    many thanks

    #menu-primary {
    font-size: 1em;
    width: 100%;
    margin: 0 0 10px 0;
    float: left;
    clear: left;
    position: relative;
    z-index: 99;
    #menu-primary li {
    float: left;
    min-height: 30px;
    padding-left: 1.8em;
    background: url(images/menu-separator.png) no-repeat left 15%;
    #menu-primary li:first-child {
    padding-left: 0;
    background: none;
    #menu-primary li a {
    font-family: ‘Abel’, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;
    font-size: 1.333333333333333em;
    font-weight: 400;
    line-height: 1em;
    margin-right: 1em;
    display: block;
    text-transform: lowercase;
    #menu-primary li.current-menu-item a { color: #aaa; }
    #menu-primary li li, #menu-primary li li.current-menu-item li {
    clear: both;
    float: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    background: none;
    #menu-primary li li:first-child, #menu-primary li li.current-menu-item li:first-child { border-top: none; }
    #menu-primary li li a, #menu-primary li li.current-menu-item li a {
    font-size: 1.166666666666667em; /* 14 / 12 = 1.166666666666667 */
    text-transform: none;
    color: #888;
    margin: 0 5px;
    padding: 12px 15px;
    #menu-primary ul li a:hover, #menu-primary li ul li a:hover {
    color: #222;
    border-bottom: none;

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know the answer right off hand, because I’m pretty new to CSS. But have you tried switching the float:left to float:center? I do everything by trial and error, lol.

    Thread Starter aida1359


    thanks @321mama for the reply. I did lots of trial but nothing changes, I made it float:none; I follow exact coding of my other website with center nav but changing code didnt change this menu to center. Maybe another code is affecting menu position??

    Hoping someone will help as dosnt look nice with center header.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Center Primary top menu’ is closed to new replies.