Jump to content

Fixed menu on mobile view

Recommended Posts

  • Susana_SQSP changed the title to Fixed menu on mobile view
  • 2 weeks later...
  • Replies 1
  • Views 880
  • Created
  • Last Reply
On 3/11/2021 at 1:30 AM, nicmoore said:

Site URL: http://www.nicolamoorestudio.com

Hi there, 

I'm using the Avenue template and wondering if anyone has code to make the menu bar stay fixed for mobile view? Happy for it to still collapse into just a menu tab, but would like that tab to be fixed at the top of the page.

thanks in advance!

Hi. You can add this code to Design > Custom CSS

@media screen and (max-width:767px) {
div#mobileMenuLink {
    position: fixed;
    top: 0;
    left: 45%;
    z-index: 10;
}
div#mobileNav {
    margin-top: 20px;
    position: fixed;
    z-index: 10;
    left: 45%;
}
header#header {
    position: fixed;
    left: 45%;
    margin-top: 30px;
    z-index: 10;
}
section#page {
    margin-top: 30px;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.