CSS3 image crop

Here is a tip how to use div to crop your images and keep its dimensions.

CSS3

<code>
.crop-image-90×90 {
border-bottom: 2px solid #E17D00;
float: right;
margin: 0 0 0 10px;
max-height: 90px;
overflow: hidden;
width: 90px;
}

.crop-image-90×90 a img {
width:auto;
height:90px;
padding:0px;
float:left;
}</code>

HTML:

<code>
<div>
<a href=”#”>
<img title=”Generic image” alt=”Generic image” src=”/file_source/images/promo_conduct.gif”>
</a>
</code>

CATEGORIES:

Tips and tricks

Tags:

Comments are closed