Press button to scroll and reveal hidden section

Hi all, I have a hidden section and would like to use BUTTON to SCROLL TO and REVEAL the section at the same time. However, whenever i press “SHOW ME SNEAKPEAK FIRST” button, it scroll to the top of the page, instead of the “OUR THOUGHT PROVOKING ARTICLE” section, (the section was revealed). How can I scroll to the section and reveal it?


Here is my public share link: LINK
(how to access public share link)

Hello Know_all_sides,

May you share a read only link to the webflow project so we can check what’s happening in the backend?

Probably the issue is just the setting of the anchor text, still can’t be sure without seeing it in the designer.

Hi, sorry i thought i have already attached. https://preview.webflow.com/preview/knowallsides?utm_medium=preview_link&utm_source=designer&utm_content=knowallsides&preview=2d152e61606dc4c0a75a9ece4fba7009&pageId=5f3e765fc68a2560ca93cf80&mode=preview

thanks a lot.
So here the issue is you are setting the initial state of Sneakpeek section to display: none. This means when the click happens this section is nowhere on the window, so it just scrolls to the top.

You have to remove the two display actions from the event and it’s done, it should work as intended.
(This is because you already did a good job by fixing height and width to 0, which graphically it’s the same of display: none, but from the browser perspective even if an element has 0 width and height it will still put it somewhere in the page, a display: none it’s just not here at all).

Webflow - knowallsides