- This topic has 13 replies, 2 voices, and was last updated 3 years, 7 months ago by
Tom.
-
AuthorPosts
-
October 12, 2018 at 3:06 pm #699787
bluebit
I currently have on the bottom of product pages Related Products at 3 columns and rows and I’d like to make the spaces between the 3 images smaller, this will also make the images slightly bigger, how do I does this?
GP Premium 1.7.2October 12, 2018 at 8:24 pm #699861Tom
Lead DeveloperLead DeveloperHi there,
Any chance you can link us to your site? Should be do-able with some CSS.
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 13, 2018 at 9:56 am #700222bluebit
https://stockisla.com/product/lion/
the white gaps of space in between the related images i think its also called gutter, how to make reduce white gap size and pics slightly bigger/wider
And is there a way to make the related images have an extra column below the first one?
October 13, 2018 at 9:56 pm #700452Tom
Lead DeveloperLead DeveloperGive this a shot:
.woocommerce .wc-related-upsell-columns-3 .related ul.products li.product { width: 31%; } .woocommerce .related ul.products li.product { margin-left: 2%; } .inside-wc-product-image { width: 100%; }
Not too sure what you mean by an extra column?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 14, 2018 at 5:58 am #700589bluebit
I tried it but had to adjust it to make it work, this is the code im using
.woocommerce .wc-related-upsell-columns-3 .related ul.products li.product {
width: 28.6%;
}.inside-wc-product-image {
width: 110%;
}But now there is a wide gap between the first and second column, see: https://stockisla.com/product-tag/lion/
How to decrease column size to same size as the row gaps?
October 14, 2018 at 9:14 am #700759Tom
Lead DeveloperLead DeveloperTry this:
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product, .woocommerce ul.products li.product a img { margin-bottom: 0; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 14, 2018 at 10:45 am #700814bluebit
That worked, but I noticed a problem on the right side for mobile is missing padding or margin, the 3 image to the right is hugging the border.
See:
October 14, 2018 at 7:24 pm #700997Tom
Lead DeveloperLead DeveloperThat’s happening because of this CSS you used:
.inside-wc-product-image { width: 110%; }
Instead of the CSS you shared above, I would do this:
.inside-wc-product-image { width: 100%; } .woocommerce .wc-columns-3 ul.products li.product, .woocommerce-page .wc-columns-3 ul.products li.product { width: 32%; } .woocommerce ul.products li.product, .woocommerce-page ul.products li.product { margin-left: 1%; } .woocommerce ul.products { margin-left: -1%; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 14, 2018 at 7:52 pm #701015bluebit
Man this sucks, so I deleted the code that i used and tried yours, but then the related product images on the product page have the big white space gaps again, so I tried experimenting with the numbers to no avail. I guess I’ll have to try something else to get it to line up correctly with reduced space gaps.
I reverted back to my deleted code as that at least looks good on desktop
October 15, 2018 at 9:14 am #701456Tom
Lead DeveloperLead DeveloperYou’d need both blocks of code I provided in order to adjust the spacing for both instances.
.inside-wc-product-image { width: 100%; } .woocommerce .wc-related-upsell-columns-3 .related ul.products li.product, .woocommerce .wc-columns-3 ul.products li.product, .woocommerce-page .wc-columns-3 ul.products li.product { width: 32%; } .woocommerce .related ul.products li.product, .woocommerce ul.products li.product, .woocommerce-page ul.products li.product { margin-left: 1%; } .woocommerce ul.products { margin-left: -1%; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 15, 2018 at 7:32 pm #701808bluebit
after tinkering around i finally got it to work and look how i want it thanks for the code π
this is what i changed to make it work:
.inside-wc-product-image {
width: 110%;
}.woocommerce .wc-related-upsell-columns-3 .related ul.products li.product,
.woocommerce .wc-columns-3 ul.products li.product,
.woocommerce-page .wc-columns-3 ul.products li.product {
width: 28.65%;
}.woocommerce .related ul.products li.product,
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
margin-left: 3.7%;
}.woocommerce ul.products {
margin-left: -4%;
}October 16, 2018 at 8:47 am #702365Tom
Lead DeveloperLead DeveloperAwesome π
We’ll be making this much easier in GPP 1.8.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 16, 2018 at 9:18 am #702406bluebit
ok, when is GPP 1.8 coming out? so i can not use the css code hehe
October 16, 2018 at 6:50 pm #702704Tom
Lead DeveloperLead DeveloperIt won’t be for a month or so π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.