Hicat Posted April 30, 2023 Share Posted April 30, 2023 Hello I want to replace the Squarespace search icon in the header with a custom png file that I've created - the default icons are not the same line weightas the shopping & account icons. I've added a png file for the new icon into the custom css section but can't work out the code to overewrite the header search form submit/input/input. Any help would be appreciated. Thanks, Link to comment
tuanphan Posted May 1, 2023 Share Posted May 1, 2023 What is site url? We can check easier 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!) Link to comment
Hicat Posted May 2, 2023 Author Share Posted May 2, 2023 https://www.hicat.co.uk Thanks, Link to comment
tuanphan Posted May 4, 2023 Share Posted May 4, 2023 On 5/2/2023 at 1:28 PM, Hicat said: https://www.hicat.co.uk Thanks, Add to Design > Custom CSS .Header-search-form-submit svg { display: none !important; } .Header-search-form-input { display: block !important; background-size: contain !important; background-repeat: no-repeat; background-position: right; background-image: url(https://static1.squarespace.com/static/52c15df7e4b04b560cae0f98/t/644cfa8d4a93220062ea5afc/1682766477877/Search+Icon+White.png) !important } 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!) Link to comment
Hicat Posted May 5, 2023 Author Share Posted May 5, 2023 Just loaded the css but wondering if there is a way just to have the icon link to the search input page rather than search text in the header? Thanks, Link to comment
tuanphan Posted May 6, 2023 Share Posted May 6, 2023 On 5/5/2023 at 2:06 PM, Hicat said: Just loaded the css but wondering if there is a way just to have the icon link to the search input page rather than search text in the header? Thanks, You mean hide this text? 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!) Link to comment
tuanphan Posted May 9, 2023 Share Posted May 9, 2023 On 5/7/2023 at 3:07 PM, Hicat said: Yes, that's it. Thanks. Add this CSS .Header-search-form-input::placeholder { color: transparent !important; } 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!) Link to comment
Hicat Posted May 10, 2023 Author Share Posted May 10, 2023 Thanks but I've not made myself clear....I want just a search icon in the header that can be picked & takes you to a search form input page - no input placeholder. I've changed the design settings to Icon only as this was set to Rectangle. Link to comment
tuanphan Posted May 12, 2023 Share Posted May 12, 2023 I see you figured it out? 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!) Link to comment
Hicat Posted May 13, 2023 Author Share Posted May 13, 2023 No, Thats the original icon - I need this swapped out with the custom css. Link to comment
tuanphan Posted May 14, 2023 Share Posted May 14, 2023 Add to Last Line in Code Injection > Footer <script> $(document).ready(function(){ $('<img src="https://static1.squarespace.com/static/52c15df7e4b04b560cae0f98/t/644cfa8d4a93220062ea5afc/1682766477877/Search+Icon+White.png">').appendTo('.Header-search-form-submit'); }); </script> <style> button.Header-search-form-submit svg { display: none !important; } button.Header-search-form-submit img { width: 20px; } </style> 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!) Link to comment
Hicat Posted May 16, 2023 Author Share Posted May 16, 2023 Excellent, that's done the trick. I really appreciate your support & help. 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