[Support request] Text not displaying well with image

Home Forums Support [Support request] Text not displaying well with image

Home Forums Support Text not displaying well with image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1633880
    Joe

    This problem is on mobile. The desktop version is good.
    In individual posts, some image is big and the text gets shrunk down to just a few characters per line.
    Here is a screenshot from my phone.
    https://photos.app.goo.gl/fBmp4ohUCqHPapcP7
    a
    The image float right. This is the way I want it on desktop.
    Is there a way to make the text display after the image on mobile only?

    Link to the post.
    https://retireby40.org/worth-more-than-you-earned/

    Thank you!

    #1634131
    David
    Staff
    Customer Support

    Hi there,

    you can add this CSS to stop the images from floating on smaller screens:

    @media(max-width: 768px) {
      .wp-block-image .alignright,
      .wp-block-image .alignleft{
        float: none;
        margin: unset;
        width: 100%;
      }
      .wp-block-image img {
        width: 100%;
      }
    }
    #1634407
    Joe

    Hi David,
    That fixed the individual post, but it messed up my front page.
    Here are some images of the front page.

    With code above – https://photos.app.goo.gl/AEzYw9V3B6gn48ZP8

    Without code above – https://photos.app.goo.gl/4Hmq3Nfpe6YStjd28

    Is there a way to limit the code to individual posts? Or put the front page on exception?

    Thank you!

    #1634410
    David
    Staff
    Customer Support

    You can target just your single posts like so:

    @media(max-width: 768px) {
      .single-post .wp-block-image .alignright,
      .single-post .wp-block-image .alignleft{
        float: none;
        margin: unset;
        width: 100%;
      }
      .single-post .wp-block-image img {
        width: 100%;
      }
    }
    #1635161
    Joe

    I think that will work for now. I’ll work around the problem on pages.
    Thank you!

    #1635411
    David
    Staff
    Customer Support

    You’re welcome

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