Keeping logo/masthead/nav sticky so that it remains during scroll down
-
Hi awesome WP community!
How do I keep the navigation bar and logo sticky so that it remains at the top of the page while I scroll down?
Similar to what you see on http://www.wired.com
Thank you!
The blog I need help with is: (visible only to logged in users)
-
-
Hi Will
Add this to the custom CSS I have already given you and we should have it working the way you want.
header#masthead { position: fixed; z-index: 9; background-color: #000000; width: 100%; } .posts-list { margin-top: 100px; } -
-
Another question – is there a way to reduce the logo size with CSS?
Adjusting the image size in the customizer doesn’t seem to be helping and when on Mobile, the logo is taking up too much space for the sticky functionality to be sensible.
-
-
I agree … so to disable the sticky function on screen sizes less than 1024 change the code as below and let me have a look :)
@media screen and (min-width: 1024px) { header#masthead { position: fixed; z-index: 9; background-color: #000; width: 100%; } .posts-list { margin-top: 100px; } } -
Hmmm no that seems to remove the sticky functionality from all screen sizes – maybe I’m pasting the code wrong?
Perhaps there’s a way to reduce the logo size so that it doesn’t take up so much of the screen on mobile? I will look into this.
-
I will have a look at reducing the logo.
I have sent you a message on the contact form on your willcady website.
-
G47n1,
If you so happen to see this, would you mind copying and pasting or sending me the entire custom CSS you sent willcady in the beginning of this post? I had the same question. (There was a chunk where you mentioned “add this to what I sent you”. If you could provide the same info. I’d greatly appreciate it.
Big Brother Theme
http://www.limberlostbrewingcompany.com
Thank you so much
-
Hi llbbcc
It was the CSS from this thread – https://en.forums.wordpress.com/topic/reducing-margins-above-and-below-logo-blink-template#post-2445211
The CSS code will probably need to be altered to work for your theme. I will have a look at it when I am back at my computer.
-
Hi llbbcc
Just to let you know that I haven’t forgotten about you.
Getting the The Big Brother Theme menu fixed to the top of the page is proving a little tricky but I will find a way :)
-
-
Wow, thank you so much for taking the time to do this.
My site is going to look awesome thanks to you. :) -
- The topic ‘Keeping logo/masthead/nav sticky so that it remains during scroll down’ is closed to new replies.