Home › Forums › Support › Sticky Menu Position This topic has 26 replies, 3 voices, and was last updated 5 years, 6 months ago by Tom. Viewing 15 posts - 1 through 15 (of 27 total) 1 2 → Author Posts March 9, 2018 at 6:51 am #515623 CG Klein Hello, I am using the flowing css to make the top bar sticky and want the primary menu to go underneath when it becomes sticky. Please help! .top-bar { position: sticky; z-index: 999; top: 0; left: 0; right: 0; } Thank you, cgk March 9, 2018 at 10:30 am #515814 TomLead Developer Lead Developer Hi there, Try this: .navigation-stick { top: 45px !important; } March 9, 2018 at 10:38 am #515821 CG Klein Hello, Worked great! Thank you much! cgk March 9, 2018 at 10:44 am #515827 CG Klein Hello, I spoke to soon, needs different value to work on mobile and dos not work with hide when scrolling down. Any ideas? Thanks again, cgk March 9, 2018 at 11:06 am #515843 CG Klein Hi, Maybe something like this, } .sticky-mobile-header { top: 90px !important; } Thanks, cgk March 9, 2018 at 9:12 pm #516099 TomLead Developer Lead Developer You’ll need to write a media query to increase or decrease the top value on mobile: @media (max-width: 768px) { .navigation-stick { top: 90px !important; } } What about it doesn’t work when the nav only appears when scrolling up? March 10, 2018 at 1:43 am #516185 CG Klein OK, That css worked for the mobile with 80px. The hide when scrolling down dose not hide but shows menu when scrolling down on both desktop and mobile. Thank you, cgk March 10, 2018 at 2:45 am #516203 CG Klein Also the top bar diapers when using the side-out menu and not at the top of the screen. March 10, 2018 at 3:17 am #516228 CG Klein This is what I have so far. .top-bar { position: sticky; z-index: 999; top: 0; left: 0; right: 0; } .navigation-stick { top: 45px !important; } @media (max-width: 768px) { .navigation-stick { top: 55px !important; } } @media (max-width: 420px) { .navigation-stick { top: 80px !important; } } @media (max-width: 320px) { .navigation-stick { top: 115px !important; } } March 10, 2018 at 10:05 am #516527 TomLead Developer Lead Developer Instead of position: sticky;, try position: fixed; As for the hide when scrolling down, I’d need to see it to come up with the fix. March 10, 2018 at 10:17 am #516542 CG Klein When I use “fixed” it places menu under top bar unless I scroll down. I can make you a login if you would please take a look. https://www.kosirs.com/wp-admin/ March 10, 2018 at 10:18 am #516543 TomLead Developer Lead Developer I’m getting this message while trying to set the password: Sorry, your request cannot be accepted. March 10, 2018 at 10:19 am #516544 CG Klein ip block i will disable for CA March 10, 2018 at 10:26 am #516555 TomLead Developer Lead Developer Got it. Add this: body { padding-top: 45px; } That will allow you to use position: fixed; instead of position: sticky; Then instead of top: 45px !important; use margin-top: 45px !important; March 10, 2018 at 10:39 am #516562 CG Klein That dose allow me to use fixed so the top bar dose not disappear on mobile when using side-out menu but the spacing is off on mobile. The hide when scrolling down dose not work on desktop or mobile. Author Posts Viewing 15 posts - 1 through 15 (of 27 total) 1 2 → You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In