Website Building » Squarespace » How Do I Make My Header Stay While Scrolling Squarespace?

How Do I Make My Header Stay While Scrolling Squarespace?

Last updated on October 1, 2022 @ 6:44 am

There are many ways to make a header stay while scrolling on a Squarespace site. One way is to use the fixed position property. This can be applied to any element on a page, and will keep that element in the same position even when the page is scrolled.

To apply the fixed position property to an element, simply add the following code to the CSS section of your Squarespace site:

.element {
position: fixed;
}

You can also use the absolute position property to keep an element in a fixed position. This can be useful if you want to keep an element in the same spot on mobile devices, where the screen size is often smaller.

PRO TIP: If you are using Squarespace to build your website, be aware that there is a known issue with headers disappearing when you scroll down the page. This can be frustrating for visitors to your site, as they may not be able to navigate to the content they are looking for. The best workaround for this issue is to use a fixed header, which will stay in place even when you scroll down the page.

To apply the absolute position property, simply add the following code to your CSS section:

.element {
position: absolute;
}

There are other positioning properties that can be used to keep elements in a fixed position, such as relative and static. However, these are not as commonly used for headers because they can cause other elements on the page to shift around.

Adding a bit of code to your CSS section is all it takes to make sure your header stays in place while visitors scroll through your Squarespace site.

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.