• Hi i am having an issue with the size of the recent posts on my home page. Currently there are 3 posts all with featured images. on the home page the image on the middle post is larger than the rest. i have tried resizing the image but this did not work. can anyone tell me why this is happening and how i can fix it. Many thanks in advance
    Billy

Viewing 6 replies - 1 through 6 (of 6 total)
  • Can you post a link to your website?

    Thread Starter billy1983

    (@billy1983)

    If your theme has a custom CSS option, use it; otherwise, get a custom CSS plugin and try:

    .view img {
    width: 100%;
    height: 200px;
    }

    You can try different values for height, but be aware that since you’re essentially forcing square pegs into round holes, some values may look worse than others.

    Thread Starter billy1983

    (@billy1983)

    thanks for the reply. do you know why it is doing this in the first place??
    Many thanks
    Billy

    What’s happening is that your theme is resizing the images to fit within a container that’s a certain number of pixels wide, but leaving the height proportional. So for example, an image that’s 600 pixels wide and 800 pixels tall that gets resized to fit within a 200 pixel wide container get resized to 200 pixels wide and 266 pixels tall, but an image that’s 600 pixels wide and 1400 pixels tall gets resized to 200 pixels wide and 466 pixels tall.

    What my code does is tell the browser to resize the image like normal, but make the height of the image 200 pixels no matter what. The 200×266 pixel image would look fine, but the 200×466 pixel image would look kind of strange.

    The practical thing here is to not worry too much about the math behind it and just focus on using your eyes.

    Thread Starter billy1983

    (@billy1983)

    ahh ok i see thanks for the info. i was just wondering why it did it for some post images and not others and how i could prevent this from happening in the future.
    Many thanks
    Billy

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘recent posts blog display problems’ is closed to new replies.