Absolute Positioned Image Zoom Not Working Properly
I am trying to zoom a image which is inside a div. When page is loaded i am showing 300*300 size image inside a 400*400 size div. So, to show the image at the center of the div i
Solution 1:
Can you try this;
HTML
<divclass="outer"><divclass="inner"><imgid="img1"src="http://siliconangle.com/files/2012/04/HTML5_Wallpaper_1680x1050.png" /></div></div><buttonclass="zoomout"data-zoom="out">Zoom Out</button >
<buttonclass="zoomin"data-zoom="in">Zoom In</button >
CSS
.outer{
height:400px;
width:400px;
overflow:auto;
border:1px solid black;
float:left;
margin:30px;
text-align:center;
}
.inner {
height:400px;
width:400px;
display:table-cell;
vertical-align:middle;
}
img {
width:300px;
height:300px;
}
Post a Comment for "Absolute Positioned Image Zoom Not Working Properly"