Reputation: 3369
I want resize an image HTML with jQuery.
It's easy elt.css({height: '42px'})
, but my problem is the magnification of the image is at the bottom, ie the top of the image does not move and it's the bottom that stretches or shortcut.
Like here : http://jsfiddle.net/763wumr0/
EDIT with absolute: http://jsfiddle.net/763wumr0/12/
I'd like to do it the other way! The bottom of the image is fixed and that's the top of the image that increases or decreases.
How can I do that?
thx.
Upvotes: 0
Views: 2788
Reputation: 754
With absolute positionning ?
http://jsfiddle.net/OxyDesign/pss3ysru/
CSS
.img-container{
width: 50px;
height: 50px;
position:relative;
}
.img-bottom
{
width: 50px;
height: 50px;
position:absolute;
bottom:0;
left:0;
}
Upvotes: 7