- This topic has 17 replies, 4 voices, and was last updated 2 years, 11 months ago by
Leo.
-
AuthorPosts
-
February 20, 2019 at 5:42 am #815419
Pedro
Hello! I have made the page of my site with Gutenberg.
On this page, I have sections of products that I have made with WooCommerce Product Blocks.
In the desktop version everything is fine. But in the mobile version there is no way to edit it.
I would like to do the following: For the pages of the store, I have configured that in the mobile version 2 product columns are shown.
I would like for this homepage to be the same, because although I have the configuration for 2 columns, only 1 column is being shown.
GeneratePress 2.2.2GP Premium 1.7.7February 20, 2019 at 5:54 am #815427David
StaffCustomer SupportHi there,
try this CSS:
@media(max-width: 768px) { .woocommerce[class*=columns-] ul.products li.product { width: 48% !important; float: left !important; margin-left: 1%; margin-right: 1%; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 20, 2019 at 6:03 am #815439Pedro
Hello David! This worked, thank you very much.
However, there are sections where it is not displayed well, both on the home page and on the store pages.
I send you a screenshot so you can see.
February 20, 2019 at 6:45 am #815463David
StaffCustomer SupportTry adding this CSS:
.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2 { line-height: 2.5ex; height: 10ex; overflow: hidden; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 20, 2019 at 7:04 am #815612Pedro
Hello david!!
Yes it worked but it affected the style and it does not look good now.
You can see in the following screenshot:
https://www.dropbox.com/s/qlqihmmesjzitf3/IMG_2005.PNG?dl=0February 20, 2019 at 7:09 am #815622David
StaffCustomer Supportits because some titles are running to 4 lines. We can either increase the height to
height: 10ex;
which will make them all 4 lines deepDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 20, 2019 at 7:10 am #815624Pedro
Hello david! And how can I do that?
February 20, 2019 at 7:14 am #815631David
StaffCustomer SupportI edited the CSS here:
https://generatepress.com/forums/topic/responsive-woocommerce-product-blocks/#post-815463Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 20, 2019 at 7:18 am #815636Pedro
Hello david! For some products the problem was corrected, but in others the problem continued.
February 20, 2019 at 7:58 am #815680David
StaffCustomer SupportI just added the two CSS codes ( using Dev tools ) and i can’t see the broken layout. Also keeps all your review starts and prices in line which looks better. Let me know.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 20, 2019 at 12:32 pm #815934Pedro
Hello david!
If you notice, in the following image the stars of the reviews do not show correctly:
February 20, 2019 at 2:10 pm #815985David
StaffCustomer SupportI updated the code here so it will hide the 5th line.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 21, 2019 at 1:51 pm #817007Pedro
Hello david!
I have updated it and now all the products appear well located, like the stars of the valuations.
However, I can see that the titles of some products (the longest) appear incomplete.
What is this about?
February 21, 2019 at 4:00 pm #817054David
StaffCustomer SupportThe code forces it to display a maximum of 4 lines. I thought it better the title is clipped on smaller devices then it create some huge spaces between your smaller titles and prices. The alternative is to use this CSS where 5 lines are set:
.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2 { line-height: 2.5ex; height: 12.5ex; overflow: hidden; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 23, 2019 at 5:34 am #818623Pedro
Hello david! It works perfectly. Thank you very much for all the help!
-
AuthorPosts
- You must be logged in to reply to this topic.