I am using a feed aggregating website. Sometimes I get post such as this: http://food101.co.il/%D7%90%D7%95%D7%98%D7%95%D7%9C%D7%A0%D7%92%D7%99-%D7%A2%D7%95%D7%9C%D7%94-%D7%9C%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D/
Where the image is larger than the text-box of the post. Here is a screen shot:
Is there a way to make sure in the css of the site that this too-large-to-fit image will be re-sized in some way?
Thanks.
I definitely wouldn’t use
max-width
, and especially notwidth
directly on theimg
selector. You then affect every image on your site.Use something more specific like
.entry-content img { max-width: 500px; }
That will target any image posted in a post or article.
you just need to edit your css style and fix one measure (in this case, the width is better), so your image will get scaled to fit that value
if you don’t specify your height, image will be resized and mantain scale accordingly. you can also specify a max-width, so that little images won’t loose quality