Jump to content

Make Menu 'section' sticky

Recommended Posts

Hey guys!

hoping to see if you help - the black 'nav' heading is actually a section, trying to make it sticky with the below code, but not working 😞

 

Keep in mind I have some custom code above it to give the stick text, slider effect

 

//HORIZONTAL STICKY NAVIGATION

 

section[data-section-id="656bb79230b8724ed00d787a"] {

  min-height: 0 !important;

  position: sticky !important;

  -webkit-position: sticky !important;

  top: 0;

  z-index: 99999 !important;

}

 

section[data-section-id="656bb79230b8724ed00d787a"]

.content-wrapper {

  padding-top: 0px !important;

  padding-bottom: 0px !important;

  margin-bottom: 0px !important;

  z-index: 99999 !important;

}

 

section[data-section-id="656bb79230b8724ed00d787a"] .html-block {

  padding-bottom: 0px !important;

  text-align: center;

  z-index: 99999 !important;

}

 

section[data-section-id="656bb79230b8724ed00d787a"]

.html-block p {

  display: inline-block;

  margin: 0 20px;

  z-index: 99999 !important;

}

 

@media only screen and (max-width: 1024px) {

section[data-section-id="656bb79230b8724ed00d787a"]{display:none;}

 }

 

 

 

Screenshot 2023-12-12 at 2.10.44 pm.png

Link to comment
  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.