This topic has 13 replies, 3 voices, and was last updated 7 years, 10 months ago ago by Rose Tyler
Hello support team. What is the best way/code to change space between products and product size? I’ll be running my site on 4 grid per row layout and I don’t like width and big side space between products.
Hello,
Could you please show a screenshot for better understanding what exactly space you want to remove?
Regards,
Rose Tyler.
Sure, Rose. Here is a screenshot with arrows – https://failiem.lv/down.php?i=jhw8grsz&view
Hello,
Please add this code in custom.css file:
.products-grid .product {
margin-bottom: 20px;
}
Best regards,
Jack Richardson.
Thanks Jack. What about these?
.products-grid .product {
margin-left:
}
.products-grid.product-count-4 .product {
width:
}
Right now I have changed values directly in /wp-content/themes/legenda/css/large-resolution.css because I wanted to see overall view. But I these lines properly insert in custom.css
Hello,
You can add this css code to custom.css:
@media (min-width: 1200px) {.products-grid.product-count-4 .product {
width: 205px;
}}
Best regards,
Jack Richardson.
Thanks for getting back to me, Jack.
What about space between products? (horizontal)
.products-grid .product {
margin-left:
}
Also your provided code doesn’t work. It takes width from large-resolution.css not custom.css
@media (min-width: 1200px) {.products-grid.product-count-4 .product {
width: 205px;
}}
Hello,
Try to add !important to the code, so it’ll be:
@media (min-width: 1200px) {.products-grid.product-count-4 .product {
width: 205px !important;
}}
As for this code:
.products-grid .product {
margin-left:
}
Please set the value you need. You can test yourself what value will fit the best.
Best regards,
Jack Richardson.
Thanks for getting back to me, Jack.
Problem with
.products-grid .product {
margin-left: 15px !important;
}
is that it also adds 15px to the first products of the column. Original scc script adds margin only to the 2nd, 3rd and 4th products
Hello,
To remove margin for the first product please use this css code:
.products-grid.product-count-4 .product:nth-child(4n+1) {
margin-left: 0 !important;
}
Best regards,
Jack Richardson.
Thanks Jack, that script works
Hello,
You’re welcome!
Regards,
Rose Tyler.
The issue related to '‘Product image vs grid size and spacing’' has been successfully resolved, and the topic is now closed for further responses