Liquid, JavaScript, themes, sales channels
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hello, I tried to edit my assets under style.scss.liquid to display two items per row in mobile, with the following code; .collection-grid .medium-up--one-half {
width: 50%;
}
It did not fix the issue and when I tried to edit the code back to the original state the website display is seriously altered. www.borealiswoolco.com
Here is snapshot of where I tried to edit the code:
Thank you so much in advance!
****Update***
I've deleted the small bit of custom code beneath the "Custom Code Below Here" line and the site is now functioning properly. However, I would like to be able to re-enter the custom code in the correct format to get those changes active again. Can someone please have a look at it and see where the error(s) are?
Thanks folks!
Solved! Go to the solution
This is an accepted solution.
Hi @Woolnerd13 ,
You just need to use display grid. In your style.css add the code below.
@media only screen and (max-width: 481px) {
.grid.product-list {
display: grid !important;
grid-template-columns: 1fr 1fr !important;
}
}
This is an accepted solution.
Hi @Woolnerd13 ,
Try to remove this two curly brackets. I don't think there should be curly brackets there. Check the image below.
highlighted the two brackets
This is an accepted solution.
Sorry. It is me. It should be display, not dsiplay. Corrected the code below.
.grid.product-list.clearfix::before {
display: none !important;
}
This is an accepted solution.
Hi @Woolnerd13 ,
You just need to use display grid. In your style.css add the code below.
@media only screen and (max-width: 481px) {
.grid.product-list {
display: grid !important;
grid-template-columns: 1fr 1fr !important;
}
}
Thanks for this. I assume this addresses the display of two items per row on mobile issue?
Could you please also look at the existing custom code from my screen shot and see if there are any errors there?
Yup this works for the display issue! However, it did not evenly distribute the rows and so there is a blank item on both the top and bottom row, which are the only rows displaying only one item. How can I fix this?
This is an accepted solution.
Hi @Woolnerd13 ,
Try to remove this two curly brackets. I don't think there should be curly brackets there. Check the image below.
highlighted the two brackets
Hi @Woolnerd13 ,
This is because of the clearfix pseudo. We can hide the :before. Just add this code below.
.grid.product-list.clearfix::before {
dsiplay: none !important;
}
Hmm, so I've added the code but I still have the blank rows on mobile. Maybe there is an error in how I entered it?
This is an accepted solution.
Sorry. It is me. It should be display, not dsiplay. Corrected the code below.
.grid.product-list.clearfix::before {
display: none !important;
}
Wow, incredible. You have saved me a lot of worry! This is my first time changing code, and somehow with your help I have got it right! Thank you Made4Uo!
Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022Shipping can be one of the most vital parts to set up and manage your business. Understand...
By Ollie Dec 16, 2022