Site logo

Archived topic

center containers in viewport and connect them with anchors

6 replies · Started by Matthias on January 12, 2023

Viewing posts 1–7 of 7

Hi,

I want to create a landingpage with several containers. The idea is to reach every container by clicking the button with an anchor link and to see every container always centered in the viewport.

Everything works fine except the viewport centering. So I will be very thankful for any tip or idea to get to the final solution.

Best regards
Mat

https://drive.google.com/file/d/1-ZNiys_gsKjA3X3e5fGYZhqtmJmY7Ne3/view?usp=share_link

Hi Fernando, I updated the link and offered the link with credentials.
Thanks in advance

I already tested the 100vh and the vertical centering, but it doesn't work "perfect".
Maybe you'll have a look again. I changed it back to 100vh now.

I found the problem :-) I doubled the anchor ID to a headline. That's why it won't center.

Thanks for refreshing my mind :-)

You're welcome, Matthias!

This archived topic is closed to new replies.