I am aware of resizing images bases on width:
img{
max-width: 100%;
height: auto;
}
or
img{
width: 500px;
height: auto;
}
Is there a way to do it by height? This does not seem to work:
img{
height: 500px;
width: auto;
}
How can I do this?