WordPress.org

Ready to get started?Download WordPress

Forums

Superhero
[resolved] Fixed gray nav bar? (7 posts)

  1. jnikkir
    Member
    Posted 1 year ago #

    Is there a way to get the top nav area (the gray bar at the top with title and links) to scroll with the rest of the page? I've tried changing the "position: fixed" line in the CSS (under #masthead-wrap), but that messes up the height and position as well... Any ideas? Is this possible?

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    How did you make that change, where?

  3. jnikkir
    Member
    Posted 1 year ago #

    When I tried it, I edited the stylesheet in Appearance > Themes > Editor > style.css

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Instead of editing the theme's files, use a Custom CSS Manager plugin to hold your CSS modifications.

    Is there a way to get the top nav area (the gray bar at the top with title and links) to scroll with the rest of the page?

    Well, the theme's demo website achieves this already so try deactivating plugins to explore whether any could be responsible for your difference.

  5. jnikkir
    Member
    Posted 1 year ago #

    Ok, I'll try the plugin...

    But the demo website doesn't achieve what I'm looking for - it does exactly what my own site does. I don't want the top navbar to stay visible while the rest of the page scrolls under it. I'd like the nav bar to scroll up with the rest of the page (disappear when you scroll down).

  6. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    There are of course some other modifications you'll need to make when you remove the position: fixed style, such as;

    #masthead-wrap {
     padding-top: 25px;
    }
    
    #masthead {
     margin-top: 0;
    }
    
    #page {
     padding-top: 0 !important;
    }
  7. jnikkir
    Member
    Posted 1 year ago #

    Yes! That's exactly what I needed. Thank you so much, Andrew!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.