Need help? Check out our Support site, then


Moving the menu to the top of the page

  1. 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:

    http://therealroryo.files.wordpress.com/2013/02/menu-problem.jpg

    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.

  2. 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;
    }
  3. Thanks designsimply! I decided not to fix the menu for this layout, but I will definitely keep this info handy for next time!

Topic Closed

This topic has been closed to new replies.

About this Topic