• Resolved HitsukiEri

    (@hitsukieri)


    Hi, not sure if this is a bug or not, but the featured image is not scaling to the width of the device and view port, please advise on how to fix this!

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

    (@bensibley)

    Thanks for using Chosen!

    Could you share a link to an example where this is happening?

    Thread Starter HitsukiEri

    (@hitsukieri)

    Hi Ben,

    Here is an example:

    https://nedswish.com/blog/retired-heroes/gemma/

    If you shrink down your browser window really small, you lose almost half the image. I would expect the image to take up 100% width of the browser window / device view port if possible.

    I tried to do some custom CSS with media queries with no avail – I am mostly doing something wrong.

    Thank you for looking into this!

    Theme Author Ben Sibley

    (@bensibley)

    Thanks!

    The issue is coming from this Custom CSS:

    .featured-image {
    height: 1000px;
    padding-bottom: 0;
    }

    This is making the Featured Images unresponsive by forcing them to be 1000px tall at all times. If you remove that code, they will shrink with the screen and keep the image uncropped.

    Thread Starter HitsukiEri

    (@hitsukieri)

    Hi Ben

    I took that off and the width works with the device view port now.
    However, I did notice another issue. For some featured images, like this one:
    https://nedswish.com/blog/retired-heroes/taz-regimental-1002/
    It is cut off on the both sides, I’ve tried cropping the image on photoshop to try to confine the size to the theme with no avail, I’ve tried to modify the crop position too.

    Please advise. Thank you for your continued patience with me.

    Theme Author Ben Sibley

    (@bensibley)

    The Featured Images are usually given a 2:1 aspect ratio, so they will get cropped vertically or horizontally if the image doesn’t fit those dimensions. However, you can change this behavior with the following code:

    .singular .featured-image {
    padding-bottom: 0;
    height: auto;
    }
    .singular .featured-image img {
    position: static;
    }

    That will allow the Featured Images to display the image at whatever its natural resolution is, so that it doesn’t get cropped.

    You may need to remove this custom CSS added to the site as well for it to work properly:

    .featured-image {
    padding-bottom: 200%;
    }
    Thread Starter HitsukiEri

    (@hitsukieri)

    Hi Ben

    Thank you so much for the code! It works now!

    Marking this as resolved!

    Thanks again!

    Theme Author Ben Sibley

    (@bensibley)

    You’re welcome!

    Stay in touch if you need anything else, and I’ll be happy to help.

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