• Resolved maz-o

    (@maz-o)


    Hello again. First of all I want to say thanks for the tremendous level of support you give to your users ??

    Then to my question: How do I make images in a post the same width as the text? By default the images get resized a little bit narrower than the text. Aesthetically for me it would work better if the images were “full width” of the post. I’m talking about normal images that you just add to your posts in between the text.

    Don’t know if this has to do with your theme or WordPress in general. Appreciate the help, thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Thanks for the kind words ??

    Try the following CSS:

    .alignnone, .aligncenter {
      margin: 1.5em auto;
    }

    That will remove the margins on the left and right side of images that are aligned center or do not have an alignment center. Without the side margins they should line up with the content.

    Thread Starter maz-o

    (@maz-o)

    Thanks but doesn’t quite work. It changes alignment to left instead of center, but the image is still resized to smaller than the content.

    see example: https://i.imgur.com/HKhl79o.png

    Theme Author Ben Sibley

    (@bensibley)

    Okay please try adding the following:

    .alignnone, .aligncenter {
      max-width: 100% !important;
    }
    Erwin

    (@erwin-hidayat)

    Hi, Ben.

    I have the same question as maz-o and tried both codes in child theme. However, all images still get resized a little bit narrower than the text. Any other option I can try? Thanks in advance. ??

    Theme Author Ben Sibley

    (@bensibley)

    Hey Erwin,

    Could you share a link to an example?

    One more thing to check first – make sure the image is wide enough to fill the post container.

    Erwin

    (@erwin-hidayat)

    Ben, I was transferring to a new web server at the time I’m posting my question. Your solution above answers my question. You know what, all your responses to every thread are impressive. Thank you!

    Theme Author Ben Sibley

    (@bensibley)

    Thanks Erwin, glad it worked for you ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Image width in blog post’ is closed to new replies.