Home › Forums › CSS › [Solved] Crop Image Size › Re: [Solved] Crop Image Size
June 8, 2010 at 8:18 pm
#77385
Member
This seems to work pretty well:
<div style="width:300px; height:150px; overflow:hidden;">
<img style="position:relative; top:-25px;"src="original.jpg" width="300" height="224" />
</div>
(of course you can externalize the CSS if you want)
Basically put the image inside a div, give the div a set height (150) and set the overflow to hidden. Then you adjust the positioning of the image to set it where you want within the div.