Jump to content

Change shopping cart icon with uploaded image

Recommended Posts

Hi. 

Hi there

 

I have tried to change the shoppingcart icon with this code i found on a toturial page but it is not working

 

// CUSTOM CART ICON

.icon--cart    
  svg {     
    display:none;   
  }  

.header .header-actions-action--cart svg {
  stroke:transparent!important
}

.header .header-actions-action--cart {
background-image: url();
background-size: 22px 24px;
background-repeat: no-repeat;
}

 

Does someone please have a code that works for a 7.1 site?

 

 

Link to comment
  • Replies 1
  • Views 293
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

@lisbet it looks to me like you've got some css mistakes that are probably making it not work.

//these are the same element and there was a missing closing bracket anyway
svg.icon--cart { 
  display:none;
}  

// i dont think you need this because of the first rule you have setting display:none; so delete if you dont
.header .header-actions-action--cart svg {
  //stroke:transparent!important 
}

//try using a different element to put your background-image on thats closer to the regular size of the cart element.
.header .header-actions-action--cart .Cart-inner {
  background-image: url();
  background-size: contain;
  background-repeat: no-repeat;
}

  Did I help you? Buy me a coffee!

👨‍💻 Bergen Design Co.

💻  I'm for hire on Upwork!

🕸️ Squarespace Experts  

🖥️ 99Designs

 🛠️ Web Designer's Toolkit

**some of these contain affiliate links

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.