The spacing on WooCommerce related products
-
I’m using Woo Commerce on my WordPress site and everything is lovely. The only thing that really bugs me is the related products. Everything fits nicely, three to a row, but on the related products, the third drops off the row making it look untidy.
After inspecting the source code, I’ve found it has a margin after the third item. On the actual products page, where everything fits nicely, the products have a specific first-post and last-post class (‘post’ makes me think that is probably built in by wordpress), but not on the related products.
I’ve scoured the web, and found this bit of css I could use, but it’s not working.
Can anyone more knowledgeable see if there is anything wrong with the code:
.related .products .ul > :nth-child(3n+3) { margin-right: 0 !important; }
(And now for some reason my related products seem to be randomised, not sure when that started happening, or why)
https://www.prophlebotomytraining.co.uk/product/liverpool-sep/
Thanks
- The topic ‘The spacing on WooCommerce related products’ is closed to new replies.