Hello, I need to set a scrollable 1 column collection grid on hompage just for mobile version, my website is infinitycosmetics.it
Now I have 2 column per row.
Then I would like 1 column collection grid not scrollable in the rest of website, just in mobile version.
Any suggestion?
1 Like
@INFINITYCOS
can you please send store url
Hi,
Please go to Actions > Edit code > assets > theme.min.css
In the theme.min.css file, please add the code below.
@media screen and (max-width: 640px)
.row {
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-content: space-around;
margin-right: -100px;
margin-left: -100px;
}
}
Because the theme uses jQuery .col-md-12, there are margins around the collection items.
If you want to adjust the space (left & right margin), please change the amount of the margin-left & margin-right.
Thanks
@INFINITYCOS
sorry i can’t see any issue can you show me
I still see 2 columns per row, any other suggestions?
Now I have 2 columns per row on mobile homepage, I need 1 column scrollable horizontally. Just in the homepage.
Hi,
You have not added the code I gave you.
Please follow the steps below.
-
Please go to Online Store > Actions > Edit code > Assets
-
(Click to) Open the “theme.min.css” file
-
Please copy the code below and paste it to the theme.min.css at the end of the file.
@media screen and (max-width: 640px)
.row .homepage-featured-products{
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-content: space-around;
margin-right: -100px;
margin-left: -100px;
}
}
If you want to make the product pictures a bit smaller, you may change the value of margin-right & margin-left. You can copy & paste the code below (for smaller product pictures).
@media screen and (max-width: 640px)
.row {
display: flex;
flex-wrap: wrap;
flex-direction: column;
align-content: space-around;
margin-right: -50px;
margin-left: -50px;
}
}
You can copy & paste one of above codes.
Hope it helps.
Thanks.
@INFINITYCOS
yes, please try this code
- Go to Online Store->Theme->Edit code
- Asset->/theme.min.css ->paste below code at the bottom of the file.
@media only screen and (max-width: 640px){
.row.homepage-featured-products {
flex-wrap: nowrap;
overflow: scroll;
}
.homepage-featured-products .grid__item {flex: 0 0 100%;max-width: 100%;}
}
1 Like
@KetanKumar Thanks dear! Is it possible to add arrow to let know it is a scrollable gallery?
I need arrows navigation in homepage grids. @KetanKumar
1 Like
@INFINITYCOS
no sorry current code doesn’t possible but its possible to customization code
ok @KetanKumar thanks, how I have to modify the code?