Centering header links in pilcrow

  • Unknown's avatar

    thearansas.wordpress.com

    I’d like to center the links displayed above the header. Can’t seem to get it on my own. Thank you in advance for the help.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Give this a try.

    #header {
    float: none;
    margin-left: auto;
    margin-right: auto;
    }
  • Unknown's avatar

    This doesn’t seem to be working. Any ideas?

  • Unknown's avatar

    I’m sorry about that, when I put the above into Firebug it worked. I’ve done some digging for another solution another forum volunteer posted (they don’t hang around here anymore) and used that to figure out the below. See how this works for you.

    .menu-header ul {
    float: left;
    position: relative;
    left: 50%;
    }
    .menu-header ul li {
    position: relative;
    right: 50%;
    }
  • Unknown's avatar

    Another note. The above will break if you have submenu items. You might wish to add the following as well to take care of sub menu items just in case you add them later. This will take care of child menu items (1 extra level) but not any additional levels. Additional levels would require more CSS.

    .menu ul ul {
    position:absolute;
    left:0;
    }
    
    .menu ul ul li {
    left:0;
    }
  • The topic ‘Centering header links in pilcrow’ is closed to new replies.