Moving the menu to the top of the page

  • Author
    Posts
  • #1147326

    therealroryo
    Member

    Hi all,

    I want my menu to be fixed to the top of the page. I already have the code for it:

    #access {
    background: #333;
    display: block;
    float: left;
    margin: 0 auto;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    }

    The problem is that when I am logged into wordpress, the wordpress bar at the top of the page covers the menu. When I’m logged out, everything looks fine.

    Here’s what I mean:

    Is there a way to have the location of the menu bar change depending on whether a person is logged in to wordpress?

    The blog I need help with is therealroryo.com.

    #1147509

    Is there a way to have the location of the menu bar change depending on whether a person is logged in to wordpress?

    There is! You can use the body classes to target each one:

    .logged-in

    So you might try adding something like this to the bottom of your custom CSS in the Appearance → Custom Design → CSS editor:

    .logged-in #access,
    .logged-in #wrapper {
    	padding-top: 28px;
    }
    #1147516

    therealroryo
    Member

    Thanks designsimply! I decided not to fix the menu for this layout, but I will definitely keep this info handy for next time!

The topic ‘Moving the menu to the top of the page’ is closed to new replies.