[Support request] Post image size on mobile

Home Forums Support [Support request] Post image size on mobile

Home Forums Support Post image size on mobile

  • This topic has 13 replies, 3 voices, and was last updated 6 years ago by Tom.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #524486
    Kevin

    I want it only on the mobile the images full appearance. 100% wide! No margins or padding.

    The big problem is that if I try to change it the way I know. The text increases along with the image. I just want images to go beyond that blank on mobiles like adsense ads do.

    An Image of how it is and how I want it:

    #524699
    Tom
    Lead Developer
    Lead Developer

    You could do this:

    @media(max-width: 768px) {
        .post-image {
            margin: -15px -25px 25px -25px !important;
        }
    }

    However, it will only work if your images are wide enough. Right now they likely aren’t, so they won’t reach the sides.

    #524704
    Kevin

    I put this code but it did not change anything … I cleared the cache and tried several times … I do not think the article images have the post-image attribute when looking at the source code of the page.

    #524824
    Leo
    Staff
    Customer Support

    Did you make sure the images are wide enough as Tom mentioned above?

    #529826
    Kevin

    750×350

    #529828
    Kevin

    750×350 |||| it looks like the code you sent me changed only the prominent images within the categories and home.

    #530144
    Tom
    Lead Developer
    Lead Developer

    The images are set to 375px wide: https://www.screencast.com/t/uUWYAE0oz

    Perhaps that’s the width you have set in the Customizer?

    If you go down small enough, you can see that it’s working: https://www.screencast.com/t/dfT3aiBAO0

    #532809
    Kevin

    As I said, these images are miniature, I want the images inside the article to stay the way they… problem they do not have the post-image .css attribute.

    They have only the img attribute, but if I do it goes with CSS going to bug everything images, and if I change the container it will take the margin of the texts beyond the image.

    #532810
    Kevin

    Summing up! I want the images inside the post to stay that way.

    #533213
    Tom
    Lead Developer
    Lead Developer

    So you’re trying to target the images inside the full post?

    If so, you can replace .post-image with .featured-image.

    #533420
    Kevin

    but .featured-image does not reference only the featured image at the top of the article?

    #534066
    Tom
    Lead Developer
    Lead Developer

    Yes, that class is only for the featured image.

    If you’re wanting to do this to all images within your posts, you would have to wrap them in a div with a class, then apply that CSS to the class.

    #534090
    Kevin

    Is not there a way to make all the images inside the post get wrapped up in a div like they did with video iframes? With a code in functions.php?

    #534567
    Tom
    Lead Developer
    Lead Developer
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.