I used to crop images using this technique
HTML
<div class="container">
<img src="http://your-source.com" alt="alt" />
</div>
CSS
.container { width: 418px; height: 240px; overflow: hidden; }
.container img { width: 100%; }
this works if you have image like this
---------
| |
| |
| |
| |
---------
but if you have image like this
-------------------
| |
-------------------
you will end up with blank area in the bottom, because the image have big width and small height.
so do you have any alternative way to crop images using css which works for both situations ?