Site logo

Archived topic

Woocommerce tablet layout set for 2 columns - displaying one

5 replies · Started by Susan on March 10, 2022

Viewing posts 1–6 of 6

Hi, I have an iPad 5th generation tablet. I have set the WooCommerce Shop layout to "Product Columns - 2", yet on portrait mode it displays only one column on both the shop and category pages. On the customizing preview it shows two columns.

How do I fix this?

I have read through previous posts on this topic, and tried some custom CSS but can't seem to make it work. Also I am not sure what breakpoints I should be using.

Thanks,

Susan

Hi Leo,

The info below is for a demo site that I cloned from Divi, so please ignore the remaining short codes. I do have another site that I rebuild from scratch in Generate Press and I am having the same problem with that one. If you want to see that one, I can create an account on that site too.

Thanks,

Susan

Hmm it looks like the iPad is a bit old and just passed the breakpoint of the 2 columns.

So this is iPad mini/air:
https://www.screencast.com/t/fmo5yHjL

And this is iPad:
https://www.screencast.com/t/vsIhio8H3E

Can you try adding this CSS?

@media (min-width: 600px) and (max-width: 768px) {
    .woocommerce #wc-column-container.wc-mobile-columns-1 .products, .wc-related-upsell-mobile-columns-1 .related ul.products, .wc-related-upsell-mobile-columns-1 .up-sells ul.products {
        -ms-grid-columns: (1fr)[2];
        grid-template-columns: repeat(2, 1fr);
    }  
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Thanks Leo, that works!

My iPad is not that old, I think I bought it in 2017, and it is still going strong! I am not so concerned about how it displays on my iPad, but how other tablet users will see it. Breakpoints are challenging.

Thanks,

Susan

No problem :)

This archived topic is closed to new replies.