Carli Posted May 5, 2021 Share Posted May 5, 2021 Site URL: https://love-carli.squarespace.com/ https://love-carli.squarespace.com/ Password: love I have changed the mobile breakpoint on my website so the hamburger menu appears at 1024 px and then set the menu to only cover 55% of the screen, so it looks like the attached screenshot. What I would love to know is how I can set an overlay so the background behind the menu darkens when the menu opens, then goes back to normal when it is closed. I would like the colour to be #1B383B at 25% opacity. Would appreciate any help! Cheers. Link to comment
tuanphan Posted May 6, 2021 Share Posted May 6, 2021 Add to Design > Custom CSS /* Popup out menu color */ .header--menu-open .header-menu { background-color: rgba(254,238,237,0.25) !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Carli Posted May 8, 2021 Author Share Posted May 8, 2021 On 5/7/2021 at 12:56 AM, tuanphan said: Add to Design > Custom CSS /* Popup out menu color */ .header--menu-open .header-menu { background-color: rgba(254,238,237,0.25) !important; } Sorry @tuanphan, I wasn't clear enough. I want to overlay the page background behind the menu when it pops out. Something like the attached. Link to comment
tuanphan Posted May 9, 2021 Share Posted May 9, 2021 On 5/8/2021 at 6:16 PM, Carli said: Sorry @tuanphan, I wasn't clear enough. I want to overlay the page background behind the menu when it pops out. Something like the attached. Add to Design > Custom CSS /* Overlay when burger active */ body.header--menu-open:after { background-color: rgba(0,0,0,0.5) !important; content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; } body.header--menu-open header#header { z-index: 20; } daniellenoakes and Carli 1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Carli Posted May 10, 2021 Author Share Posted May 10, 2021 19 hours ago, tuanphan said: Add to Design > Custom CSS /* Overlay when burger active */ body.header--menu-open:after { background-color: rgba(0,0,0,0.5) !important; content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; } body.header--menu-open header#header { z-index: 20; } Thank you so much @tuanphan! Much appreciated. Link to comment
daniellenoakes Posted 23 hours ago Share Posted 23 hours ago hey! this code worked for me, except it had one problem where the background overlay doesn't show up on any other section than at the top of each page! so when I scroll down, and then try to open the menu, the background doesn't show. any ideas ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment