Jump to content

Change shopping cart icon

Recommended Posts

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!




Screen Shot 2021-11-14 at 6.51.43 PM.png

Link to comment

add !important after url, it should be

background-image: url(https://static1.squarespace.com/static/5f86281606a9135cfdb25eba/t/61906bc144385f37e1965097/1636854721212/shopping+cart.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
  • 2 years later...

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

Please help 🙂

Link to comment


.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

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.