charlineca Posted September 3, 2022 Posted September 3, 2022 (edited) 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 September 3, 2022 by charlineca
tuanphan Posted September 4, 2022 Posted September 4, 2022 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!)
charlineca Posted September 4, 2022 Author Posted September 4, 2022 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.
charlineca Posted September 4, 2022 Author Posted September 4, 2022 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.
tuanphan Posted September 5, 2022 Posted September 5, 2022 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? 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!)
charlineca Posted September 5, 2022 Author Posted September 5, 2022 (edited) 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 September 5, 2022 by charlineca
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment