The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Menu positioning

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #195643

    Fist time post:)

    Im developing a wp site

    and I noticed that my menu section text position on my main page is just a but off from when my sticky menu kicks in after you select a section. Seems like its a few pixels foo maybe the padding on the main page? Anyway im pulling out my hair trying to figure it out. Any help is greatly appreciated.


    I’m not 100% sure exactly what you mean by “just a bit off”, but I can assume that you’re talking about the 20px on .menu.

    Basically there’s that margin-top: 20px so when you scroll down that 20px is scrolled through before the navbar is set to position: fixed with top: 0.

    So I can only theorize, since I don’t know what’s supposed to happen, that the 20px buffer when scrolling down is so small that it looks like it’s jumping a little.

    Unless you’re talking about something else.


    It’s not really off, it’s just scrolling a bit to the top and then stays there. You’ll see it a little better what I mean if you add this to your CSS:

    .stuckMenu.navbar-wrapper {
    background: #333;

    If you want the menu to be stuck at the top (without that space above), remove the top margin of 20 pixels from .menu.

    EDIT: @shaneisme was faster than me.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.