[Resolved] How can I create a fixed top bar, header and top menu?

Home Forums Support [Resolved] How can I create a fixed top bar, header and top menu?

Home Forums Support How can I create a fixed top bar, header and top menu?

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #880826
    David
    Staff
    Customer Support

    You can ignore them – the WP Additional CSS doesn’t parse some of the newer CSS features.

    #881690
    Gerhard

    David,
    header and menu are sticky now, but there is one strange thing: On pages built with elementor the contents scroll in front of the header and the menu (cf. start page). Whereas on pages built with the the classic wordpress editor the scrolling is correct, i.e. header and menu stay in the foreground, contents disappear behind when scrolling (cf. “Datenschutz”; “Impressum”).
    I checked the difference with another test page using elementor, the result is the same.
    Currently I have deactivated the css code due to the issue.

    Gerhard

    #881757
    Tom
    Lead Developer
    Lead Developer

    Hard for me to tell without seeing the issue, but try this as your CSS:

    .custom-fixed-header {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 999;
    }
    #882095
    Gerhard

    Thanks a lot. It works!
    But the mobile view is unacceptable as the sticky header now covers most of the screen. I should have thought about that. Sorry.
    I suggest making only the main navigation sticky and let the logo and the text widgets disappear when scrolling.
    Sorry for bothering you again.

    #882113
    David
    Staff
    Customer Support

    So you want only the nav to be sticky on mobile? What about on desktop do you still want both header and nav to stick?

    #883041
    Gerhard

    On mobile as well as on desktop the nav should be sticky, nothing else.

    #883089
    David
    Staff
    Customer Support

    You can simply use the Sticky Navigation option in Customizer > Layout > Sticky Navigation.
    Then this:
    https://generatepress.com/forums/topic/how-can-i-create-a-fixed-top-bar-header-and-top-menu/#post-880684

    Is not required.

    #883695
    Gerhard

    Thanks a lot, David. Everything is fine now.

    #883759
    David
    Staff
    Customer Support

    Glad to be of help

    #958658
    Stephan

    Hi,

    I´d like to reopen this topic. I want to make the navigation (top of the side) sticky but there is no menu as you mention Customizer > Layout > Sticky Navigation.

    #958664
    Stephan

    Sorry, found it. Translation issue

    #958665
    Leo
    Staff
    Customer Support

    Awesome 🙂

    #958666
    Stephan

    It now works besides the start main page. any clues?

    #958675
    Stephan

    After some debugging it works on the english site but not on the main german site (wpml)

    #958676
    Stephan

    It is not a cache topic as I checked on chrome and IE in parallel

Viewing 15 posts - 16 through 30 (of 32 total)
  • You must be logged in to reply to this topic.