How to synchronize image height according to width?

I would like to resize dimension of thumbnail image of related posts, I’m trying to do this with CSS in my stylesheet, but I can not guess proper dimensions. When we enter a width dimension for images in Photoshop, height is also automatically resized, is there also any way to do this with CSS?

.related-posts img {
float: left;
width: 210px;
height: /*height will auto according to width */

Read more here: How to synchronize image height according to width?

Leave a Reply

Your email address will not be published. Required fields are marked *