I want to show an image from an URL with a certain width and height even if it has a different size ratio. So I want to resize (maintaining the ratio) and then cut the imag
.crop { float: left; margin: .5em 10px .5em 0; overflow: hidden; /* this is important */ position: relative; /* this is important too */ border: 1px solid #ccc; width: 150px; height: 90px; } .crop img { position: absolute; top: -20px; left: -55px; }