[Resolved] Display 2 column on mobile

Home Forums Support [Resolved] Display 2 column on mobile

Home Forums Support Display 2 column on mobile

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1233100
    Janne

    Hi.
    Can you help me with displaying 2 columns instead of 1 on mobile in the blog? Found this code here. With the code I get two columns, but the two columns is only covering 50 % of the width.


    @media
    (max-width: 767px) {
    .mobile-grid-100 {
    clear: none;
    width: 50%;
    }
    }

    #1233136
    Leo
    Staff
    Customer Support

    Hi there,

    What should happen to the featured post?

    Also 50%?

    #1233152
    Janne

    Do you mean if the featured post also is only half the width? yes.

    #1233163
    Leo
    Staff
    Customer Support

    Try this instead:

    @media (max-width: 767px) {
        .generate-columns.mobile-grid-100 {
            clear: none;
            width: 50%;
        }
    }
    #1233177
    Janne

    It worked, thanks. Is it possible to get some air between the images?
    And is it possible to remove some info when on a small screen? For example the categories.

    #1233294
    Leo
    Staff
    Customer Support

    Try this:

    @media (max-width: 767px)
        .generate-columns-activated .generate-columns-container {
            margin-left: -40px;
        }
        .generate-columns-container>* {
            padding-left: 40px;
        }
        .generate-columns-container .page-header {
            margin-left: 40px;
        }
        .entry-meta {
            display: none;
        }
    }
    #1233713
    Janne

    It worked. It hovever looks like the page is wider than what what shows. When we are inside a category page, the title is cut. Check the link in the first post. And is it possible to also remove author and time published?

    #1234169
    Leo
    Staff
    Customer Support
    #1234408
    Janne

    Thanks, it worked. But is it possible to also remove author and time published?

    #1234494
    Leo
    Staff
    Customer Support

    My CSS above should do that already:
    https://generatepress.com/forums/topic/display-2-column-on-mobile-2/#post-1233294

    Looks like you didn’t update the last block.

    #1235112
    Janne

    Didn`t copy all, sorry. Works like a sharm now! Thanks.

    #1235407
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

    #1438236
    Evenit

    Hi may you help me in display 2 columns in mobile also for my site? I tried your css but doesn’t work for me.
    Thanks

    #1438332
    Leo
    Staff
    Customer Support

    Can you open a new topic for your question?

    Thanks ๐Ÿ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Display 2 column on mobile’ is closed to new replies.