Jump to content

Mega menu does not stay open

Recommended Posts

Site URL: https://espacedesign.squarespace.com/

Hi, I have coded a mega menu for my site https://espacedesign.squarespace.com/ (password: espace) using CSS and Javascript. It opens when you hover over "Menu", however, it does not stay open somehow? It closes as soon as I move my mouse away from the Menu button. Can anyone help with this? 

I followed the instructions here to code the Mega Menu: https://www.will-myers.com/articles/building-a-mega-menu-in-squarespace-71-free

Edited by charlineca
Link to comment
  • Replies 5
  • Views 355
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Edit margin-top: 20px to 0px

.header-display-desktop [href="/menu"]+.header-nav-folder-content {
    width: 100vw;
    right: 0 !important;
    left: 0 !important;
    position: fixed;
    box-sizing: border-box;
    margin-top: 20px;
    border-bottom: 0.5px solid;
}

 

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
4 hours ago, tuanphan said:

Edit margin-top: 20px to 0px

.header-display-desktop [href="/menu"]+.header-nav-folder-content {
    width: 100vw;
    right: 0 !important;
    left: 0 !important;
    position: fixed;
    box-sizing: border-box;
    margin-top: 20px;
    border-bottom: 0.5px solid;
}

 

Then I am losing the line / border that's under the header though.. any thoughts on that? I can't really add a border-top as that places the border on a different position.

Link to comment
10 hours ago, tuanphan said:

Edit margin-top: 20px to 0px

.header-display-desktop [href="/menu"]+.header-nav-folder-content {
    width: 100vw;
    right: 0 !important;
    left: 0 !important;
    position: fixed;
    box-sizing: border-box;
    margin-top: 20px;
    border-bottom: 0.5px solid;
}

 

And do you know how I can make the background completely transparent? Right now, there is sort of like a "box" / lines around it.

Link to comment
12 hours ago, charlineca said:

Then I am losing the line / border that's under the header though.. any thoughts on that? I can't really add a border-top as that places the border on a different position.

You can add border bottom

.header-display-desktop [href="/menu"]+.header-nav-folder-content {
    width: 100vw;
    right: 0 !important;
    left: 0 !important;
    position: fixed;
    box-sizing: border-box;
    margin-top: 0;
    border-bottom: 0.5px solid;
    border-top: 1px solid black;
}

 

7 hours ago, charlineca said:

And do you know how I can make the background completely transparent? Right now, there is sort of like a "box" / lines around it.

You mean remove color around menu?

image.thumb.png.d016a9fdf34aa8f8260d9f67f3a3460f.png

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
11 hours ago, tuanphan said:

You can add border bottom

.header-display-desktop [href="/menu"]+.header-nav-folder-content {
    width: 100vw;
    right: 0 !important;
    left: 0 !important;
    position: fixed;
    box-sizing: border-box;
    margin-top: 0;
    border-bottom: 0.5px solid;
    border-top: 1px solid black;
}

 

thank you. Removing the margin works, however it "moves" the menu up (not sure how to explain) which looks weird, I want to keep the underline of the navigation and have the dropdown start below (that's why I added the margin). 

Edited by charlineca
Link to comment

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.