- This topic has 5 replies, 2 voices, and was last updated 3 years, 10 months ago by David.
-
AuthorPosts
-
June 23, 2020 at 2:36 am #1338400Matt
I’ve recently moved to Woocommerce blocks and have a few styling issues I’d like some help with. The Customise > Layout options don’t seem to work on blocks. note: I’m using several different product category blocks on the custom shop page.
1. The vertical spacing of text under each product is off – there’s a Sale badge that’s way too tall and throws out formatting if the display row also contains non-sale items. Can the badge be moved above the image like the /prints/seascapes/ page?
2. The horizontal alignment of the last row is off if the last row contains only 1 or 2 products
There is a 3rd issue where vertical spacing is wildly inconsistent when different height product images are used – but I think it’s best I correct that with regenerating my images with consistent whitespace added.
June 23, 2020 at 5:06 am #1338544DavidStaffCustomer SupportHi there,
the Theme doesn’t control the Woocommerce Blocks styles – for some reason the Woo developers decided to abandon the templates/HTML/CSS classes that they use in their theme templates and their shortcodes.
On your other product archives you’re using Elementor – would it not make sense to also use that here to achieve the same style ?
June 23, 2020 at 5:54 am #1338602MattOh, bummer! Does that mean the GP themes use the classic Woo implementation?
I recently recreated my elementor shop page in blocks because:
a) it did just as good a job for what I needed
b) significantly improved performance now elementor is disabled on that pageI could try the official Woo forum as they were v helpful with a recent blocks Q.
June 23, 2020 at 7:57 am #1338930DavidStaffCustomer SupportOK
Then try this;1. Try this – adjust the top and right accordingly:
.wc-block-grid.has-3-columns .wc-block-grid__product { position: relative; } .wc-block-grid__product-onsale { position: absolute; top: 10px; right: 10px; }
You have this CSS which is making the sale badge taller:
.wc-block-grid__product-onsale { font-family:Karla; font-size:15px; height:40px; }
Remove the height property – instead use
line-height: 1;
2. In this CSS you have added to your child theme – include the max-width property below:
.wc-block-grid.has-3-columns .wc-block-grid__product { flex: 1 0 31.33333%; padding: 20px 20px 10px; margin: 10px; max-width: 31.33333%; }
June 23, 2020 at 8:48 am #1339001MattGlorious! Thanks so much David – that set me on the right path and it now looks great.
June 24, 2020 at 2:08 am #1339862DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.