Jump to content

cart style as text on desktop but icon on mobile -- is it possible?

Recommended Posts

Hi

In my site header I would like my cart element to display as text on desktop but as an icon on mobile but I'm struggling to find code for this?

Can anyone help would be greatly appreciated

C

Link to comment
  • Replies 7
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...
On 12/17/2023 at 11:03 PM, entrepreneuress said:

Hi @tuanphan 

I'm trying to do this too: Client wants cart text on desktop, icon on mobile:

https://wolf-raspberry-fr8r.squarespace.com/
PW: GG24

I might add a custom icon instead of the one that's there. Would the code be different?

Thanks,
Corinne

Add Cart icon to this position?

image.png.cbed8f07ca8f03cf8183a0a1b6aebde0.png

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

Add this to Custom CSS. Replace Pixabay with cart icon

.header-display-mobile a.cart-text-link:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2023/11/12/18/52/christmas-8383920_1280.jpg);
    background-size: cover;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
}

image.png.1d35150f06cfdfb77748f49ae8ddf008.png

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

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.