Home Forums WoodMart support forum Images not shrinking to “max-width” in blog and product body

Images not shrinking to “max-width” in blog and product body

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #617401

    jp-7376
    Participant

    Since some days ago, images that are wider than the screen size (speacially in mobile devices) aren’t shrinking to the maximum width of the screen as usual.

    I have already verified the “styles.css” file of the woodmart theme and the code is correctly written:

    img {
        max-width: 100%;
        height: auto;
    }

    How can we fix this?

    Attachments:
    You must be logged in to view attached files.
    #617565

    Bogdan Donovan
    Keymaster

    Hello,

    Please provide us with your admin access so we can log in and check this on your end.

    Thank you in advance.

    #617886

    jp-7376
    Participant

    Sure, Can you please provide an email address?

    #618256

    Bogdan Donovan
    Keymaster

    Hi,

    Email: [email protected]

    #618745

    jp-7376
    Participant

    Access has been granted

    #618861

    Bogdan Donovan
    Keymaster

    Try to add the following code snippet to the Global Custom CSS area in Theme Settings.

    .post-single-page .wd-entry-content > div[id*="attachment"] {
    	max-width: 100%;
    }

    Kind Regards

    #619098

    jp-7376
    Participant

    Thank you. Some images are shrinking to the screen size, but we detected other that don’t.

    For example in this product: https://vapotlan.com/products/arizer-solo-iii-vaporizador-herbal-premium

    Also the last image of this blog post: https://vapotlan.com/guia-como-elegir-tu-primer-vapo-herbal-vapotlan

    How can we get all images in both blog posts and product pages shrink to screen size.

    Attachments:
    You must be logged in to view attached files.
    #619170

    Bogdan Donovan
    Keymaster

    Try to replace previous custom CSS code with the following code to make it work for both blog and product pages:

    [id*="attachment"].alignleft,
    [id*="attachment"].aligncenter,
    [id*="attachment"].alignright {
    	max-width: 100%;
    }

    Kind Regards

Viewing 8 posts - 1 through 8 (of 8 total)