Hello, good evening!
I’ve put this code on my theme liquid, but only one works
.product-info .page-width {
max-width: 80% !important;
padding-right: 0px !important;
}
@media screen and (max-width: 768px) { /* Mobile version */
.product-info .page-width {
max-width: 90% !important; }
}
I want the width on desktop/laptop version to be 80% width, but 90% on mobile, but it both changes to 90%, or if I delete the 90%, it changes back to 80%
website - https://mx3ph-com.myshopify.com/products/coffee-mix-with-mangosteen-exocarp-mx3
password - mx3ph
Anyone knows how to fix it? I’m still beginner
Please assist.
Thank you!
Hi Mabinibooks,
Update the class to:
@Mabinibooks Hello
div#ecom-homepage {
max-width: 80% !important;
}
@media screen and (max-width: 768px) { /* Mobile version */
div#ecom-homepage {
max-width: 90% !important;
}
}
If its helpful Like and Accept as solution Thanks
Thanks for replying bro, but I want it implemented on product page, not homepage
Update the class to:
product-info .page-width {
max-width: 80% !important;
padding-right: 0 !important;
}
@media screen and (max-width: 768px) {
/* Mobile version */
product-info .page-width {
max-width: 90% !important;
}
}
Hi @Mabinibooks
- Go to Online Store → Theme → Edit code.
- Open your theme.css / based.css file and paste the code in the bottom of the file.
@media(min-width:990px){
.page-width {
width: 80% !important;
}
}
@media(max-width:989px){
.page-width {
width: 90% !important;
}
}
Result:
If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!
@Mabinibooks
product-info .page-width {
max-width: 80% !important;
padding-right: 0 !important;
}
@media screen and (max-width: 768px) {
/* Mobile version */
product-info .page-width {
max-width: 90% !important;
}
}
Hello bro, it worked! Thank you so much
Btw, I have been a subscriber of yours for quite some time, and implemented some of your tutorials - breadcrumbs, and on this site - the video carousel
Thanks again & Happy New Year!
Thank you and I’m glad to hear the tutorials have been helpful!