Websites | Photography | Video Editing | 3D Animations

From the Blog

Mar
07
Posted by Paul Costan at 5:07 pm

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>