PalmetteHome Posted August 28, 2020 Posted August 28, 2020 Site URL: http://www.palmettehome.com Hi, I have a custom bag icon and it works great on desktop. I need to also show the same custom bag icon on mobile. Currently, the original bag icon is showing in mobile, not my custom icon. I think I need to include a media query but can't get it to work. Here is the code I'm using right now: .tweak-header-cart-style-bag .Header .Cart>* { visibility: hidden !important; } .tweak-header-cart-style-bag .Header .Cart .sqs-cart-quantity { visibility: visible !important; margin-bottom: 9px; margin-left: 2px; } .tweak-header-cart-style-bag .Header .Cart { background-image: url(IMAGE URL HERE); background-size: cover; background-repeat: no-repeat; width: 35px; height: 35px; }
tuanphan Posted August 28, 2020 Posted August 28, 2020 Edit your code to .tweak-header-cart-style-bag .Header .Cart>*, .Mobile-bar .Cart>* { visibility: hidden !important } .tweak-header-cart-style-bag .Header .Cart .sqs-cart-quantity, .Mobile-bar .Cart .sqs-cart-quantity { visibility: visible !important; margin-bottom: 9px; margin-left: 2px } .tweak-header-cart-style-bag .Header .Cart, .Mobile-bar .Cart { background-image: url(https://static1.squarespace.com/static/5db70be950a9242bc19ec39e/t/5f455cb90556a5623a04be4c/1598381242067/Tote_Bag_Icon.png); background-size: cover; background-repeat: no-repeat; width: 35px; height: 35px } 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!)
PalmetteHome Posted August 28, 2020 Author Posted August 28, 2020 Great! Last question would be, can I change the margins for .sqs-cart-quantity for mobile? so I have one set of margins for desktop and one for mobile? I'm seeing now that the quantity is off center on mobile if I have the margins set for desktop viewing. Thanks!
PalmetteHome Posted August 28, 2020 Author Posted August 28, 2020 also can I change just the size of the bag icon for mobile?
tuanphan Posted August 29, 2020 Posted August 29, 2020 add this code for mobile, you can adjust values @media screen and (max-width:640px) { .Mobile-bar .Cart .sqs-cart-quantity { margin-bottom: 9px; margin-left: 2px } .Mobile-bar .Cart { width: 35px; height: 35px } } 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!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.