The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Crop Image Size Re: [Solved] Crop Image Size


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" />


(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.