JT4 Posted August 15 Share Posted August 15 Hello, I would like to apply my custom icon as a .png (or anything that works really) to my shopping cart icon. I have tried a few different versions of code from YT videos/forums, but nothing is working for me. The closest I got was the code below. The icon appeared in the background but the shopping cart icon remained as well. Any feedback would be great! Thanks. // Custom Cart Icon // .header .header-actions-action--cart .icon { background: url(https://static1.squarespace.com/static/66a036752d0ce27755ed7c26/t/66bd6076cfbeaf4c68532124/1723687030952/pack3.pngIMAGE-URL-HERE.png) center no-repeat; stroke: transparent !important; content: ""; background-size: contain; } Link to comment
Lesum Posted August 15 Share Posted August 15 @JT4 Hi! Can you share your site URL for context? If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
JT4 Posted August 15 Author Share Posted August 15 Yes! URL: https://www.jaackoneil.com/ password: hi Link to comment
tuanphan Posted August 17 Share Posted August 17 On 8/15/2024 at 9:00 PM, JT4 said: Yes! URL: https://www.jaackoneil.com/ password: hi Change your code to this .header .header-actions-action--cart .Cart-inner { background: url(https://static1.squarespace.com/static/66a036752d0ce27755ed7c26/t/66bd6076cfbeaf4c68532124/1723687030952/pack3.pngIMAGE-URL-HERE.png) center no-repeat; stroke: transparent !important; content: ""; background-size: contain; background-repeat: no-repeat; } .header .header-actions-action--cart svg { visibility: hidden; } 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
connigher Posted Sunday at 12:14 AM Share Posted Sunday at 12:14 AM (edited) On 8/17/2024 at 3:43 AM, tuanphan said: Change your code to this .header .header-actions-action--cart .Cart-inner { background: url(https://static1.squarespace.com/static/66a036752d0ce27755ed7c26/t/66bd6076cfbeaf4c68532124/1723687030952/pack3.pngIMAGE-URL-HERE.png) center no-repeat; stroke: transparent !important; content: ""; background-size: contain; background-repeat: no-repeat; } .header .header-actions-action--cart svg { visibility: hidden; } i did this but the cart seems to be smaller/offset slightly to the rest of the header items (emerssed.com pass:27) Edited Sunday at 12:15 AM by connigher Link to comment
tuanphan Posted 2 hours ago Share Posted 2 hours ago On 9/8/2024 at 7:14 AM, connigher said: you can change contain to a fixed size background-size: 50px; 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment