I am trying to put an image with absolute position inside a .well div. I have to keep the image position absolute as I would like to create a responsive image using following CSS format. But the image appears out of the div scope.Here are my code for html and css
<div class="container">
<div class="well">
<img class="img-polaroid" src="http://testimage.png" />
</div>
</div>
.css
img{
position: absolute;
max-width: 80%;
top: 10%;
left: 10%;
}
As you can see I cant change the position property to 'relative'. I also tried to add a height:auto; property to .well class but it didn't go through neither.