Jump to content

Customize Shopping Cart Icon with IMAGE

Recommended Posts

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;
}

Screenshot2024-08-14at10_15_18PM.png.e99aec3e3b001c484c634959d5fb3ab0.png

Link to comment
  • Replies 5
  • Views 334
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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
  • 3 weeks later...
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 by connigher
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.