[Resolved] 2 columns in mobile

Home Forums Support [Resolved] 2 columns in mobile

Home Forums Support 2 columns in mobile

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1319601
    William

    On mobile, how can I show the posts in 2 columns as oppose to one?

    My site’s password is: Generatepress

    Thanks!

    #1319850
    Leo
    Staff
    Customer Support

    Hi there,

    Try this CSS:

    @media (max-width: 768px) {
        .wp-show-posts-columns .wp-show-posts-single {
            width: 50%;
        }
    }

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

    #1319896
    William

    Hi Leo, Thanks for the CSS.

    It works but there’s no space in between. Please take a look. Thanks!

    #1320019
    Leo
    Staff
    Customer Support

    Try this:

    @media (max-width: 767px) {
        body .wp-show-posts-columns, body .wp-show-posts-inner {
            margin-right: 10px !important;
        }
    }
    #1320082
    William

    Hi Leo,

    That code made the post single column again. Any way to fix it?

    Thanks!

    #1320924
    Leo
    Staff
    Customer Support

    I don’t see this code being added anymore?

    #1320980
    William

    Hi Leo, that’s strange. I added the code and it’s still there. The 2nd code made the post width in mobile a bit smaller as opposed to splitting it into two.

    Thanks!

    #1321028
    Leo
    Staff
    Customer Support

    I’m looking at your CSS and definitely don’t see the first block of code:
    https://generatepress.com/forums/topic/2-columns-in-mobile/#post-1320019
    https://www.screencast.com/t/ZVjUZr8glz

    You are also missing a closing bracket here:

    @media (max-width: 768px) {
    	.post-image img {
    		max-width: 100%;
    	}
    #1321462
    William

    Hi Leo, my apologies. I thought I was supposed to replace the second CSS with the first. Everything works perfectly now!

    Thank You!

    #1322374
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.