I want to have a custom css code that makes the image banner label button to be outline style only on mobile, and not on desktop,like shown below
the url is https://cheffings.net/collections/all
A user seeks custom CSS to make an image banner button display with an outline style on mobile devices only, while keeping the default filled style on desktop. They provided screenshots showing the desired mobile appearance and shared their store URL (cheffings.net/collections/all).
Multiple solutions were offered:
LizHoang suggested adding CSS to base.css targeting .button.button--primary with media query max-width: 768px, changing background to white and text to black
suyash1 provided similar CSS targeting .banner__buttons .button with max-width: 749px breakpoint
topnewyork recommended inserting CSS via <style> tag in theme.liquid before </head>
websensepro offered more specific CSS targeting the full class chain .banner__box ... .banner__buttons a.button.button--primary
All solutions use media queries to apply white background and black text colors exclusively on mobile viewports. The discussion remains open with no confirmed resolution from the original poster.
I want to have a custom css code that makes the image banner label button to be outline style only on mobile, and not on desktop,like shown below
the url is https://cheffings.net/collections/all
Hi @lukafernada
Please share the store URL or the current theme youβre working on. I know your store URL, but I canβt see the banner matching the picture you posted.
@lukafernada can you please share this page link?
Hi @lukafernada , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks
Hi @lukafernada can you share store url?
Hi @lukafernada
You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file
@media (max-width: 768px) {
a.button.button--primary {
background: #fff !important;
color: #000 !important;
}
}
Result
Best,
Liz
@lukafernada please add this css to the very end of your base.css file and check,
Shopify Admin β Online Store ->Theme β Edit code β base.css
@media screen and (max-width:749px){
.banner__buttons .button{background-color: #fff; color: #000;}
}
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Hi @lukafernada
@media(max-width:768px){
.banner__box.content-container.content-container--full-width-mobile.color-background-1.gradient .banner__buttons a.button.button--primary {
background: #ffff !important;
color: #000 !important;
}
}
Result:
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Use our Big Bulk Discount app to boost your sales!
(https://apps.shopify.com/big-bulk-discount). Easy to set up and perfect for attracting more customers with bulk discounts. Try it now and watch your revenue grow!