FGFGFG Posted December 4, 2023 Share Posted December 4, 2023 Hi there, I created a custom header menu button so it has an image in instead of text. Issue is, on the mobile menu, the button is blank. Can't work out why or find a solution. Any help much appreciated! Current code I'm using is: .header-actions-action .btn { background-color: transparent !important; background-image: url(https://images.squarespace-cdn.com/content/655760ca5ce91354ff938b5a/71a5c7bc-6aac-454f-979c-b857c95f03f1/Discover+CLUB.png); background-size: contain !important; background-position: center; background-repeat: no-repeat !important } Site: https://mustard-bird-7p9h.squarespace.com/ Password is: FG123 Thanks! Link to comment
JayVanDyke Posted December 4, 2023 Share Posted December 4, 2023 (edited) @FGFGFG try using this selector for the mobile one. replace your code with this to target both at the same time. .header-menu-cta, .header-actions-action { .btn { background-color: transparent !important; background-image: url(https://images.squarespace-cdn.com/content/655760ca5ce91354ff938b5a/71a5c7bc-6aac-454f-979c-b857c95f03f1/Discover+CLUB.png); background-size: contain !important; background-position: center; background-repeat: no-repeat !important } } Edited December 4, 2023 by jaeveedee added a user tag ☕ Did I help you? Buy me a coffee! 👨💻 Bergen Design Co. 💻 I'm for hire on Upwork! 🕸️ Squarespace Experts 🖥️ 99Designs Link to comment
FGFGFG Posted December 4, 2023 Author Share Posted December 4, 2023 17 minutes ago, jaeveedee said: @FGFGFG try using this selector for the mobile one. replace your code with this to target both at the same time. .header-menu-cta, .header-actions-action { .btn { background-color: transparent !important; background-image: url(https://images.squarespace-cdn.com/content/655760ca5ce91354ff938b5a/71a5c7bc-6aac-454f-979c-b857c95f03f1/Discover+CLUB.png); background-size: contain !important; background-position: center; background-repeat: no-repeat !important } } Thanks for your reply. It disappears completely on the mobile menu with this code. Link to comment
JayVanDyke Posted December 4, 2023 Share Posted December 4, 2023 @FGFGFG is the code in there still? I don't see it. If it's not can you add it back and ill see whats not working? ☕ Did I help you? Buy me a coffee! 👨💻 Bergen Design Co. 💻 I'm for hire on Upwork! 🕸️ Squarespace Experts 🖥️ 99Designs Link to comment
FGFGFG Posted December 4, 2023 Author Share Posted December 4, 2023 3 minutes ago, jaeveedee said: @FGFGFG is the code in there still? I don't see it. If it's not can you add it back and ill see whats not working? It's in now, thanks Link to comment
Solution JayVanDyke Posted December 4, 2023 Solution Share Posted December 4, 2023 .header-menu .header-menu-cta, .header-actions-action { a.btn { background-color: transparent !important; background-image: url(https://images.squarespace-cdn.com/content/655760ca5ce91354ff938b5a/71a5c7bc-6aac-454f-979c-b857c95f03f1/Discover+CLUB.png) !important; background-size: contain !important; background-position: center; background-repeat: no-repeat !important } } Try and replace with this. Added some more specificity and there was something overriding your background-image part so added !important to that. tuanphan 1 ☕ Did I help you? Buy me a coffee! 👨💻 Bergen Design Co. 💻 I'm for hire on Upwork! 🕸️ Squarespace Experts 🖥️ 99Designs Link to comment
FGFGFG Posted December 5, 2023 Author Share Posted December 5, 2023 13 hours ago, jaeveedee said: .header-menu .header-menu-cta, .header-actions-action { a.btn { background-color: transparent !important; background-image: url(https://images.squarespace-cdn.com/content/655760ca5ce91354ff938b5a/71a5c7bc-6aac-454f-979c-b857c95f03f1/Discover+CLUB.png) !important; background-size: contain !important; background-position: center; background-repeat: no-repeat !important } } Try and replace with this. Added some more specificity and there was something overriding your background-image part so added !important to that. I think this has worked, thank you!! JayVanDyke 1 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