Moving the menu to the top of the page
-
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: (visible only to logged in users)
-
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-inSo 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; } -
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.
