Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #226644

    Hello

    I have a small issue with my fixed header. I used this code in my quick css:

    #header_main .container, .main_menu ul:first-child > li a, .logo img, .logo a {
    height: 88px !important;
    line-height: 88px !important;
    max-height: none !important;
    }

    to make my header not re-size when the page is scrolled down. I am also doing a single page website and linking to items on the page. Now when I click on those links the page scrolls up too high and the linked to item is behind the header.

    Can you help?

    Thanks

    #226668

    Hi NeilMaxwell!

    Please try to remove the css code and insert this code at the bottom of functions.php:

    
    add_filter('body_class','avia_remove_resize_function');
    function avia_remove_resize_function($classes)
    {
        $classes[] = 'avia_deactivate_menu_resize';
        return $classes;
    }
    

    – it should deactivate the resize effect without additional css code.

    Best regards,
    Peter

    #226681

    Hi Peter

    Thanks for the quick reply. That unfortunately does exactly the same thing as before. Anyting else I can try?

    thanks
    Neil

    #226815

    Hey!

    Please try the workaround Josue posted here https://kriesi.at/support/topic/stop-resizing-header-but-anchor-not-correct/#post-220223

    Best regards,
    Yigit

    #226845

    Nice that works. Just a note the code to change is now on line 811 according vi anyway.

    Do I still need to have the code that Peter gave me in the fuctions.php or can I go back to the quick css that I was using before.

    Also what will happen to this .js file when the theme is updated?

    Thanks
    Neil

    #226846

    Hi!

    It will be overwritten unless you are using a child theme ( http://kriesi.at/documentation/enfold/using-a-child-theme/ )
    Peter’s code does what you would like to do using custom CSS. Just a cleaner solution. But if you would like to use Custom CSS, you can remove Peter’s code and add your code to Quick CSS or Custom.css file

    Regards,
    Yigit

    #226854

    I will try the child theme route. Thanks for all the help!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Single page website fixed header problem’ is closed to new replies.