smoman Posted August 22, 2023 Share Posted August 22, 2023 I am attempting to add a custom logo to a particular page in my site. Through research I have found code that works (changing color, changing logo, removing navigation etc). But I cannot figure out how to make the code work for mobile as well as desktop. Here is the code I have so far: <style> .header-title-logo a { background-image: url(https://images.squarespace-cdn.com/content/v1/603ebfa17e44e82c29011a26/5deac22e-036f-4603-b342-3cd42ba13302/Untitled_Artwork+2.png?format=1500w); background-size: cover; background-repeat: no-repeat; background-position: center center; } </style> <style> div.header-background {background-color: #C5C7F3 !important; } </style> <style> .header-title-logo img { visibility: hidden; } .header-nav { display: none; } Link to comment
Ziggy Posted August 22, 2023 Share Posted August 22, 2023 Can you share your website URL? Selectors for the mobile header/logo etc are different from desktop, so you effectively need to do this twice. BTW I'm not sure if you just didn't include it, but in the code you shared you need a closing </style> tag. You can also put all of your style code in one set of style tags rather than opening and closing three times. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
smoman Posted August 23, 2023 Author Share Posted August 23, 2023 18 hours ago, Ziggy said: Can you share your website URL? Selectors for the mobile header/logo etc are different from desktop, so you effectively need to do this twice. BTW I'm not sure if you just didn't include it, but in the code you shared you need a closing </style> tag. You can also put all of your style code in one set of style tags rather than opening and closing three times. Thanks for the tip. I’m very much a beginner. Url is Shannoncamillearts.com/reelsisterspod Squarespace URL is http://spinach-accordion-j2if.squarespace.com Link to comment
Web_Solutions Posted August 23, 2023 Share Posted August 23, 2023 4 hours ago, smoman said: Thanks for the tip. I’m very much a beginner. Url is Shannoncamillearts.com/reelsisterspod Squarespace URL is http://spinach-accordion-j2if.squarespace.com Replace your code with the code below. <style> .header-title-logo a { background-image: url(https://images.squarespace-cdn.com/content/v1/603ebfa17e44e82c29011a26/5deac22e-036f-4603-b342-3cd42ba13302/Untitled_Artwork+2.png?format=1500w); background-size: cover; background-repeat: no-repeat; background-position: center center; } div.header-background { background-color: #C5C7F3 !important; } .header-title-logo img { visibility: hidden; } .header-nav { display: none; } </style> Ainul 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
smoman Posted August 24, 2023 Author Share Posted August 24, 2023 19 hours ago, Web_Solutions said: Replace your code with the code below. <style> .header-title-logo a { background-image: url(https://images.squarespace-cdn.com/content/v1/603ebfa17e44e82c29011a26/5deac22e-036f-4603-b342-3cd42ba13302/Untitled_Artwork+2.png?format=1500w); background-size: cover; background-repeat: no-repeat; background-position: center center; } div.header-background { background-color: #C5C7F3 !important; } .header-title-logo img { visibility: hidden; } .header-nav { display: none; } </style> Thanks for your help. It is still showing the incorrect logo on mobile. It also has a border around both mobile and web headers. Link to comment
Solution Web_Solutions Posted August 24, 2023 Solution Share Posted August 24, 2023 3 hours ago, smoman said: Thanks for your help. It is still showing the incorrect logo on mobile. It also has a border around both mobile and web headers. Please replace the code with the code below. <style> .header-title-logo a, .header-mobile-logo a { background-image: url(https://images.squarespace-cdn.com/content/v1/603ebfa17e44e82c29011a26/5deac22e-036f-4603-b342-3cd42ba13302/Untitled_Artwork+2.png?format=1500w); background-size: cover; background-repeat: no-repeat; background-position: center center; } div.header-background { background-color: #C5C7F3 !important; } .header-title-logo img, .header-mobile-logo img { visibility: hidden; } .header-nav { display: none; } </style> smoman and Ainul 2 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
smoman Posted August 24, 2023 Author Share Posted August 24, 2023 46 minutes ago, Web_Solutions said: Please replace the code with the code below. <style> .header-title-logo a, .header-mobile-logo a { background-image: url(https://images.squarespace-cdn.com/content/v1/603ebfa17e44e82c29011a26/5deac22e-036f-4603-b342-3cd42ba13302/Untitled_Artwork+2.png?format=1500w); background-size: cover; background-repeat: no-repeat; background-position: center center; } div.header-background { background-color: #C5C7F3 !important; } .header-title-logo img, .header-mobile-logo img { visibility: hidden; } .header-nav { display: none; } </style> That worked! Is there anyway to remove the border or the padding around the header? Link to comment
Ziggy Posted August 24, 2023 Share Posted August 24, 2023 Add this to the previous code: .header .header-announcement-bar-wrapper .header-border { background: #c5c7f3; } smoman 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
smoman Posted August 24, 2023 Author Share Posted August 24, 2023 That did the trick thank you both! 33 minutes ago, Ziggy said: Add this to the previous code: .header .header-announcement-bar-wrapper .header-border { background: #c5c7f3; } Ziggy 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