Hello i want to show the full image in a specified height div like this

        <div style="width:400px"> <img class="images" src="someimage.jpg"> </div>

i tried this

    .images
    {
    width: 100%;
      height:auto;
    }

but it crops the image it doesnt show the full image in height and width

You say "in a specified height of div", but you havent specified a height on that div, so what's the problem?

Also what you have here on HTML & CSS, it doesn't crop the image.
https://codepen.io/gentlemedia/pen/xxxZzrq