As you scroll down a Squarespace page, the fixed navigation bar stays at the top of the screen, making it easy for visitors to navigate your site. But what if you want to make your navigation bar “sticky” so it scrolls down with the page?
There are two ways to make your navigation bar sticky in Squarespace. The first is to use CSS code, and the second is to use JavaScript.
To use CSS code, go to Design > Custom CSS and add the following code:
#header {
position: fixed;
width: 100%;
z-index: 999;
}
This code will make your header fixed to the top of the screen, meaning it will scroll down with the page. You can also add other CSS properties to this code to change the look of your header, such as changing the background color or adding a border.
PRO TIP: If you are not familiar with coding, we do not recommend attempting to make your navigation sticky in Squarespace. Doing so could result in unforeseen issues with your site’s design and functionality.
To use JavaScript, go to Settings > Advanced > Code Injection and add the following code in the Header Code Injection box:
<script>
window.onscroll = function() {myFunction()};
var header = document.getElementById("header");
var sticky = header.offsetTop;
function myFunction() { if (window.pageYOffset > sticky) { header.classList.add("sticky"); } else { header.remove("sticky"); } } </script> <style> .sticky { position: fixed; top: 0; width: 100%;} .sticky + .content { padding-top: 102px;}</style>
This code will also make your header fixed to the top of the screen and will scroll down with the page. The difference between this code and the CSS code is that this code also adds a class to the header when it becomes sticky, which can be used to change the look of the header when it’s scrolled down (such as making the background color different).
10 Related Question Answers Found
If you want to make your Squarespace navigation sticky, there are a few things you can do. First, you need to add a little CSS to your site. You can do this by going to the Design tab and then clicking on Custom CSS.
There is one simple way to hide navigation in Squarespace. That is to add a Custom CSS code to your website design. In this tutorial, we will hide the navigation in this Squarespace website as an example.
There are two ways to change the navigation in your Squarespace account. The first is to change the navigation labels. To do this, go to the Design tab and click on Navigation.
There are two ways to change your navigation in Squarespace:
1. In the Home Menu, click Design.
2. Click Site Styles.
3.
Adding navigation to your Squarespace site is a great way to help visitors find their way around. There are a few different ways to do this, and the method you choose will depend on how many pages you have and how they’re organized. If you have a small site with only a few pages, you can add navigation by creating links to each page from the home page.
There is one straightforward way to hide the navigation bar in Squarespace. First, go to the “Main Navigation” page, then click on the “Settings” icon of your target page. In the pop-up window of “Page Settings”, click on the “Advanced” button.
There are a few different ways to freeze the navigation bar in Squarespace. One way is to use the code injection feature to add some custom CSS. Another way is to use a third-party plugin.
Primary navigation is the process of organizing the content on a website into a hierarchy. The main purpose of primary navigation is to help users find the information they are looking for on a website. One way to think of primary navigation is as a table of contents for a website.
There are two ways to change the navigation position in Squarespace:
1. In the Home Menu, click Design, then click Site Styles. 2. Scroll down to the Navigation section and use the drop-down menu to select the new position for your navigation. 3.
There are many ways to change the navigation layout in Squarespace. The most common way is to use the Navigation Layout panel in the Design Manager. This panel allows you to change the way your navigation appears on your site.