• Resolved tbronson

    (@tbronson)


    How can I display the blog post images at full width in the mobile view. I want to eliminate the left and right margins to allow a larger image size.

    Thanks!

    • This topic was modified 8 months ago by tbronson.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Alvind

    (@alvindcaesar)

    Hi there,

    Can you provide your site’s URL so we can take a look at your current mobile layout?

    Thread Starter tbronson

    (@tbronson)

    I’m using the GP basic theme, with no modifications.

    The posts index has title, image, text, with a margin on the left and right. I want the image only to be full width only in the mobile view.

    If you still need to see the site, is there a way to DM you a link?

    • This reply was modified 8 months ago by tbronson.
    Alvind

    (@alvindcaesar)

    Okay, try adding this CSS:

    @media (max-width: 768px) {
    .single-post.separate-containers .inside-article {
    padding: 0;
    }

    .single-post.separate-containers .inside-article .entry-header,
    .single-post.separate-containers .inside-article .entry-content,
    .single-post.separate-containers .inside-article footer.entry-meta {
    padding: 30px;
    }
    }

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

    If it doesn’t work, feel free to share the link here in your reply so I can check it directly.

    Thread Starter tbronson

    (@tbronson)

    Thanks, but that didn’t work. I cleared caches on server and browsers.

    Here’s the link: https://www.temporary-url.com/ED8D (sorry for the delay, I was burned before with posting links in the wrong places).

    ying

    (@yingscarlett)

    Hi there,

    Thanks for providing the site link.

    Try removing Alvind’s CSS and add this:

    @media(max-width: 768px) { 
    .single-post .entry-content .wp-block-image {
    margin-inline: -30px;
    max-width: 100vw;
    }
    }

    Let me know if this helps!

    Thread Starter tbronson

    (@tbronson)

    Thanks! That seems to work perfectly in single post view, but not on the blog index page with the list of posts and excerpts.

    (BTW, full width IMO makes a HUGE difference in how engaging the images are. It would be great if this full width was an easy option.)

    ying

    (@yingscarlett)

    The CSS is for single post only as you only provided a single post link, can you link me to your blog as well?

    Thread Starter tbronson

    (@tbronson)

    Oh, sorry, I thought that went to the home page. I checked this one: https://www.temporary-url.com/DE41C.

    Alvind

    (@alvindcaesar)

    For the homepage, try this CSS:

    @media (max-width: 768px) {
    .blog.one-container .site-content {
    padding: 0;
    }

    .blog.one-container .entry-header,
    .blog.one-container .entry-summary,
    .blog.one-container footer.entry-meta,
    #nav-below {
    padding-inline: 30px;
    }
    }
    Thread Starter tbronson

    (@tbronson)

    That seems to be working great. Thanks, Alvind and ying!

    Cheers!

    Alvind

    (@alvindcaesar)

    You’re welcome!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Full width mobile blog post image’ is closed to new replies.