• Resolved RobinHeard

    (@robinheard)


    I am new to wordpress and this is my first post on the forum. My issue is the template I am using had a menu bar that was fixed so I changed the css
    code (on line 37) from
    position:fixed; to position:static;
    This fixed the problem of the header sticking when I scroll but created some wierd issue when you scroll. (See Here)

    Any help would be amazing and thank you in advance! Below is the css stylesheet.

    CSS Stylesheet

Viewing 3 replies - 1 through 3 (of 3 total)
  • You probably have some jquery in the header / footer that adds the class “fixed” to the header.

    Same goes from .content-area except that for the content-area the script just adds inline styling.

    Good luck

    Thread Starter RobinHeard

    (@robinheard)

    Thank you so much for your help! I checked the header.php file and for some reason the code to add a search bar was the culprit.

    <div class="header_right">
                        <div class="search_form">
                            <?php get_search_form(); ?>
                        </div>

    But once again thank you for all your help!

    You’re most welcome. For future reference I recommend using chrome (right click + inspect element) aka ctrl+shift+c.

    That should open up the developer tools panel and you should be able to see all of your elements on the site. While having that open and scrolling up and down, it was visible that those pieces were being added into the html code.

    Just a tip for anything related in the future.

    Good luck 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Header And Content Move When You Scroll’ is closed to new replies.