blix Posted November 14, 2021 Share Posted November 14, 2021 Site URL: https://sandrazacharia.squarespace.com/ Hello, I wonder if you can help me with this code. I want to use a different shopping cart icon and I am using the following code: /* Cart Icon in the Header */ .icon--cart { svg { display:none ; } background-image: url(https://static1.squarespace.com/static/5f86281606a9135cfdb25eba/t/61906bc144385f37e1965097/1636854721212/shopping+cart.png); background-size: 25px 25px; background-repeat: no-repeat; } The new icon will not display. And when I remove the word "none" after display in code, both icons appear, overlapping each other. I am having trouble with just the new icon appear (ring shape shopping cart) password: jewelry Thank you so much! Jeanette Link to comment
tuanphan Posted November 15, 2021 Share Posted November 15, 2021 add !important after url, it should be background-image: url(https://static1.squarespace.com/static/5f86281606a9135cfdb25eba/t/61906bc144385f37e1965097/1636854721212/shopping+cart.png) !important; Jmontison 1 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
Jmontison Posted February 19 Share Posted February 19 Hello Tuanphan! I've got the same problem. Can you help? Here's the code I got: .header .header-actions-action--cart svg {stroke:transparent!important} .header-actions-action--cart .icon-cart-quantity {display:none} .header .header-actions-action--cart {background-image: url(https://static1.squarespace.com/static/63d1e9b20cb2274e46b41daa/t/65d1b8ea98788b4d155e7e8c/1708243179034/basket.png) !important; background-size: contain} Even after I add !important (or use the same CSS code mentioned), it doesn't work. WEBSITE: www.thebraveleap.com PASSWORD: g Please help 🙂 Link to comment
tuanphan Posted February 19 Share Posted February 19 It shows fine to me 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
Jmontison Posted February 19 Share Posted February 19 It is hard to see because I'm trying to make the cart transparent through CSS, but it is still white -just on top of the image I uploaded. If you zoom in, you will see it! Link to comment
Jmontison Posted February 19 Share Posted February 19 I sent you the image and the way it's supposed to look through direct message. Link to comment
Jmontison Posted February 20 Share Posted February 20 I FIXED IT! .header .header-actions-action--cart svg {opacity:0!important} .header-actions-action--cart .icon-cart-quantity {display:none} .header .header-actions-action--cart {background-image: url(https://static1.squarespace.com/static/63d1e9b20cb2274e46b41daa/t/65d1b8ea98788b4d155e7e8c/1708243179034/basket.png) !important; background-size: contain} The important part I changed was: {opacity:0!important} 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