Home > front end >  My image size is fixed. How to make it flexible?
My image size is fixed. How to make it flexible?

Time:03-30

I have this custom coded blog page created - Link

The width of the blog page content is perfect and this is how I want it to be. But If you look at the images, they are also stretched to match the width of the content. I don't want that to happen and moreover, the images are stretched

Here is the css code that I've added to create the content's width:

.post.type-post.status-publish * {width: 800px !important;max-width: 800px !important; margin: auto !important;}
How to make the images stay flexible and change size to my needs while keeping the content's width same?

Please help me out here.

Thanks!

CodePudding user response:

This works for me:

.post.type-post.status-publish img {
    width:auto !important;
}
  • Related