Resize image width in function of set image height in CSS?

by Joe   Last Updated August 07, 2019 08:10 AM

I'm trying to tell an image to be displayed with a maximum height of 400 pixels, and a width adapted onto the used height, with the following CSS - Code:

span.itemImage img {

With the code above, images don't exceed the height of 400 px; that works perfectly, but their width doesn't get adapted in function of the height they have. Anyone knows how to program that properly in CSS ?

Related Questions

Images Not Showing Up in Category View

Updated October 04, 2016 09:04 AM

Show intro image instead of full text image

Updated January 28, 2019 14:10 PM