Jump to content

Close Burger Menu by clicking outside the box | JavaScript

Recommended Posts

Posted

Hey experts!
I need help with injecting code (Java Script) to be able to close the burger menu without clicking on the X.
The website is not public yet, so I can't share the URL, unfortunately.
Can someone still help, or should I come back once we're public?

Thanks in advance!!  Lisa 

 

image.thumb.png.49d587c65d05075b64e6b8c5daac9ab8.png



I added  CSS to get this results so far (see photo).

/* Burger */
.header .header-burger{display:flex}
.header-nav, .header-actions {display:none}

/* Change menu size */
.header--menu-open .header-menu {
opacity: 1; visibility: visible;
     bottom:0vh; 
    left:65%!important; 
    right:-5vw; 
    top:0vh 
}
/* Change alignment & spacing */
.header-menu-nav-folder-content{
 justify-content:flex-start !important
}

.header--menu-open  .header{ 
    top:0vh; 
    left:0vw
}  
/* Burger Menu font size*/
.header-menu-nav-item a {
font-size: 110%; line-height: 60%
}

  • Replies 1
  • Views 1.3k
  • 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.