- This topic has 3 replies, 2 voices, and was last updated 4 years, 3 months ago by ambassaden.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
July 27, 2020 at 3:21 pm #11649ambassadenParticipant
I can only see one product (or block) per row in mobile mode. How do i change to two or three products per row?
Marcus
July 27, 2020 at 8:41 pm #11659AndyKeymasterFor two per row, use this CSS code:
@media only screen and (max-width: 480px) { .woocommerce ul.products.columns-2, .woocommerce-page ul.products.columns-2, .woocommerce ul.products.columns-3, .woocommerce-page ul.products.columns-3, .woocommerce ul.products.columns-4, .woocommerce-page ul.products.columns-4, .woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5, .woocommerce ul.products.columns-6, .woocommerce-page ul.products.columns-6, .woocommerce ul.products.columns-7, .woocommerce-page ul.products.columns-7, .woocommerce ul.products.columns-8, .woocommerce-page ul.products.columns-8, .wc-block-grid.has-2-columns .wc-block-grid__products, .wc-block-grid.has-3-columns .wc-block-grid__products, .wc-block-grid.has-4-columns .wc-block-grid__products, .wc-block-grid.has-5-columns .wc-block-grid__products, .wc-block-grid.has-6-columns .wc-block-grid__products, .wc-block-grid.has-7-columns .wc-block-grid__products, .wc-block-grid.has-8-columns .wc-block-grid__products { grid-template-columns: repeat(2,48.5%); } }
For three per row use this:
@media only screen and (max-width: 768px) { .woocommerce ul.products.columns-2, .woocommerce-page ul.products.columns-2, .woocommerce ul.products.columns-3, .woocommerce-page ul.products.columns-3, .woocommerce ul.products.columns-4, .woocommerce-page ul.products.columns-4, .woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5, .woocommerce ul.products.columns-6, .woocommerce-page ul.products.columns-6, .woocommerce ul.products.columns-7, .woocommerce-page ul.products.columns-7, .woocommerce ul.products.columns-8, .woocommerce-page ul.products.columns-8, .wc-block-grid.has-2-columns .wc-block-grid__products, .wc-block-grid.has-3-columns .wc-block-grid__products, .wc-block-grid.has-4-columns .wc-block-grid__products, .wc-block-grid.has-5-columns .wc-block-grid__products, .wc-block-grid.has-6-columns .wc-block-grid__products, .wc-block-grid.has-7-columns .wc-block-grid__products, .wc-block-grid.has-8-columns .wc-block-grid__products { grid-template-columns: repeat(3,31.33%); } }
Copy the code to ‘Customize’ > ‘Additional CSS’ and hit publish button to save.
July 27, 2020 at 10:47 pm #11669ambassadenParticipantThank you! Worked great
July 28, 2020 at 9:20 am #11671ambassadenParticipantBtw. Is it possible to do something with the main page? The blocks (and text) are huge in the mobile version. Only one block per row
Cheers Marcus
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The topic ‘Products per row mobile view’ is closed to new replies.