Guest Posted December 14, 2022 Share Posted December 14, 2022 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
tuanphan Posted December 17, 2022 Share Posted December 17, 2022 Hi, What is your site url? 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
entrepreneuress Posted December 17, 2023 Share Posted December 17, 2023 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 Link to comment
tuanphan Posted December 19, 2023 Share Posted December 19, 2023 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? 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
entrepreneuress Posted December 20, 2023 Share Posted December 20, 2023 Correct, thank you! Link to comment
tuanphan Posted December 22, 2023 Share Posted December 22, 2023 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; } 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
entrepreneuress Posted December 22, 2023 Share Posted December 22, 2023 (edited) Thanks. Is it possible to adjust the height of the (0) to make it more side by side with the icon and hamburger menu? I figured out the bottom-padding, but can't find a selector that doesn't target both bag icon and (0). I just want to target the (0). Thanks! Edited December 22, 2023 by entrepreneuress Link to comment
tuanphan Posted December 24, 2023 Share Posted December 24, 2023 Use code like this div.header-display-mobile a.cart-text-link span { position: relative; top: -5px; } 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment