MM_CA Posted February 8, 2021 Share Posted February 8, 2021 (edited) Site URL: https://www.soulslicepizza.com I'm using a dark theme for the overlay mobile menu, which means I have a lighter logo version I'd like to swap out when the menu is open. I've uploaded a lighter version of the logo for this purpose. I'm using the following css @media screen and (max-width:767px) { .header--menu-open .header-title-logo a { background-image: url('https://static1.squarespace.com/static/5fc6fe0f791da6493f67c762/t/6020a88d5714ae7f74a1debe/1612753037570/logo+-+reverse.png'); background-size: cover; background-repeat: no-repeat; } } what I notice is it does not swap the current logo, but seems to be positioned behind it instead. Is there another line of css I'm missing here? Is there a div i need to set an opacity value on? Edited February 8, 2021 by MM_CA Link to comment
Solution tuanphan Posted February 8, 2021 Solution Share Posted February 8, 2021 try this code @media screen and (max-width:767px) { .header--menu-open .header-title-logo a { background-image: url('https://static1.squarespace.com/static/5fc6fe0f791da6493f67c762/t/6020a88d5714ae7f74a1debe/1612753037570/logo+-+reverse.png'); background-size: cover; background-repeat: no-repeat; } .header--menu-open .header-title-logo img { visibility: hidden; } } sayreambrosio 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
sayreambrosio Posted August 25, 2022 Share Posted August 25, 2022 On 2/8/2021 at 6:38 AM, tuanphan said: try this code @media screen and (max-width:767px) { .header--menu-open .header-title-logo a { background-image: url('https://static1.squarespace.com/static/5fc6fe0f791da6493f67c762/t/6020a88d5714ae7f74a1debe/1612753037570/logo+-+reverse.png'); background-size: cover; background-repeat: no-repeat; } .header--menu-open .header-title-logo img { visibility: hidden; } } This worked a treat for swapping out my logo when the menu is open. Thank you for posting it. 🙂 tuanphan 1 Designer that loves working with the 'misfits' & International Multi-Genre Author Design Website: fifthestatedesigns.studio Author Website Sayre's Custom Code Collection 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