Shopify themes, liquid, logos, and UX
My 'Add to Cart' button is styling weirdly on mobile while being fine on desktop. It looks as if the 'Add to cart' button is too close to the dynamic pay button below it and any styling I try to apply to it seems to be ignored on mobile only while appearing on desktop.
In my base.css, I was doing some testing and added this code:
@media only screen and (max-width: 767px) {
.product-form__submit {
background: #000000 !important;
color: #ffffff !important;
margin-bottom: 30px !important;
}
}
It affected the product page 'Add to cart' button on desktop but had no affect on the mobile version. I'll include a screenshot of what it looks like on mobile. If anyone has any ideas about what might be causing this or how to fix it, it would be greatly appreciated.
You can try to update code to this and check
@media (max-width: 767px) {
.product-form__submit {
background: #000 !important;
color: #fff !important;
margin-bottom: 30px !important;
}
}
- Helpful? Like and Accept solution! Support me! Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Hey Dan thanks for the reply, unfortunately that did not work. It's worth mentioning that even if I don't apply a media selector for mobile screens and apply general CSS for the 'Add to cart' button then it will not affect it in any way meaning for some reason the CSS is not being applied to mobile while it is being applied to desktop.
If anyone has any ideas it would be greatly appreciated.
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024