Question:
I am struggling to figure out how to prevent the top of the anchored section from scrolling behind the site header/menu. The header scroll effect is set to “freeze”, with overlap set to “none”, yet when scrolling to an anchor, the header overlaps the top of the anchored section. What am I missing?
Product:
Wix Studio
What are you trying to achieve:
When using an anchor menu or button, I would like the anchored section to scroll to the bottom of the site header, so that the menu isn’t cutting off the top of the section.
What have you already tried:
Read WIX Studio help section on using anchor menus. Searched message boards for similar questions; found this example, which is still unresolved: Anchor overlap by the header - Ask the community - Wix Studio Community forum
Additional information:
1 Like
add the header height in px to padding at the top of the section. This will ensure any content wont be hidden behind the header.
2 Likes
The suggestion to “add height” in padding to the section would also mean that we would have to set this manually for each breakpoint. The logic should AUTOMATICALLY add the height of the header to the scroll logic because the header can be any size at any time in any given design and breakpoint. This can’t be done by math cleanly and universally. Needs to be done by logic in the scroller code when freeze is active.
2 Likes
Hello, thanks for the suggestion. How do I add this padding? As I see it adds a gap at the top of the section.
This isn’t really a great solution because that means there is unnecessary spacing between the sections when scrolling normally. Is there any other fix for this? Seems like such a simple issue to resolve and basic feature.
I agree. But the way anchors are set up in Studio that is what we have to work with currently. Maybe the team are working on a solution to this problem as it always gets brought up.
It would be handy if we had the same anchor function as the standard Wix Editor added to the Studio editor. May have something to do with responsive behaviour why its not in Studio.
1 Like
Agreed! I actually managed to get on live chat with your support team and we used the workaround mentioned in another forum to use empty containers as the anchors at the bottom of each section and adjust the margin of the container to get the desired distance from the top! Would suggest recomending this to others too as it works great!