Join the Webstudio community

Updated last month

Linking to Sections with a Fixed Header

At a glance

The community member has created a fixed header that is approximately 400px tall on desktop, and when linking to a section on an internal page, the section appears behind the header. The community member suspects this is due to the 400px margin applied to the section below the header. A comment suggests using scroll-padding-top to address this issue. Another comment notes that the fixed header is too large, making the layout barely usable on a 14" MacBook.

Useful resources
I have created a header that is a bit long approx 400px on desktop, it is set to fixed with a high z index. when I link from the home to a section on a internal page (to the section ID) that section appears behind the header, like the page has scrolled down. I imagene it is because of the 400px marin applied to the section below the header - any suggestions on how to link to a section without having the section appear behind the header? here is a link to the project:https://p-960ae06a-6d6f-48c4-b447-0b8290bfbd46.apps.webstudio.is/?authToken=2ca9eb46-399f-4ef2-ba86-109505218fe0&mode=preview
O
2 comments
first of all this fixed header is too big, the layout is barely usable on a 14" macbook, like looking out of the window
Add a reply
Sign up and join the conversation on Discord