• Hello,

    I want to set fixed height & auto width for featured images on posts pages by using css.

    Please provide me css code for that.

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi there,

    please provide a link to your site

    Thread Starter manav kalra

    (@manavkalra15)

    Hi David,

    I don’t want to share in public is there a way to share in private ?

    Or you can check this screenshot for reference https://prnt.sc/zKKq5dkiHomD

    Not sure – try this CSS:

    .post-image img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    Thread Starter manav kalra

    (@manavkalra15)

    Thanks for reply David.

    I tried this but its changing image width and height on posts list pages like homepage, category & tags. I checked source code of my post page and found this class “featured-image” for featured images. I made some changes to code to make it work properly.

    .featured-image img{
    	height: 200px;
      width: auto;
    }

    Glad to hear that.

    I know this is an old post, but I used the code given by @diggeddy and it works, since yesterday I was looking for a code to have the images on the homepage the same size.
    I wanted to thank you, thank you

    Thank you for taking the time to say thank you ??

    Glad it was found to be useful.

    Hallo, ich habe ?hnliches Problem. Bei unserem Onlineshop, in der mobilversion sind manche Produktbilder gr?sser und verzerrt. Sehr wahrscheinlich ist das nach der Optimierung (WP Rocke, Jacascript und CSS Dateien wurden nicht optimiert) Imagify. Weiss jemand, was das sein k?nnte?

    • This reply was modified 1 year, 8 months ago by justynajjj.

    Hi @justynajjj,

    We recommend temporarily disabling plugins one by one to test which one is causing the issue.

    Hi Guys my site is using a template named Belinni as my active theme but the Featured Image or sometimes called Post Thumbnails are with different sizing (sometime square and sometimes rectangular with different shapes. Would like to fix them separately / altogether. I tried both css code at Theme–>Customize–>Custom CSS but in vain. Am I pasting to the wrong section or the code not fit my theme?

    Site: jengadaily.com

    Hi @jengadaily,

    It would be best to reach out to your theme’s support regarding this.

    Hi, @jengadaily
    This is a paid theme available from ThemeForerst.
    https://themeforest.net/item/belinni-multiconcept-blog-magazine-wordpress-theme/20107600
    No more updates since June 2021.
    Maybe find a more recent theme?
    And choose from the bestsellers to increase the chances of getting updates for many years.
    Good Luck


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to set fixed size on featured image in wordpress post’ is closed to new replies.