Naomi-lifelab Posted March 22, 2022 Share Posted March 22, 2022 Site URL: https://lifelab.world/ Hi Squarespace experts, I have been trying to make the main nav bar to be sticky as I scroll through the website however I also have a language switcher. I am trying to add the language switcher on the code but I cannot seem to make it work. I also wanted this to work on mobile. 🙂 This is the main code that I also found here on the forum: .Header.Header--top { position: sticky; position: -webkit-sticky; top: 0px; z-index: 1000; width: 100%; } Here is the code I am trying to add: .Header.language { position: sticky; position: -webkit-sticky; top: 0px; z-index: 1000; width: 100%; } or .language { position: sticky; position: -webkit-sticky; top: 0px; z-index: 1000; width: 100%; } It doesn't seem to work the navigation bar does not follow along. I know I am almost there I am just having a hard time finding the right code. Thank you in advance for your help. Link to comment
Naomi-lifelab Posted March 22, 2022 Author Share Posted March 22, 2022 1 hour ago, Lordman said: Use position: fixed; else if you want to use sticky, then you have to use wrapper over Header.Header--top then apply sticky position to inside that div It works! Thank you so much! 🙏 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment