Centering header links in pilcrow

  • Author
    Posts
  • #651818

    immcnab
    Member

    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 thearansas.com.

    #651952

    Give this a try.

    #header {
    float: none;
    margin-left: auto;
    margin-right: auto;
    }
    #652253

    immcnab
    Member

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

    #652254

    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%;
    }
    #652255

    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.