Is it possible to make the container to fit the size same as the containing image without explicitly set the width and height of image to container?
<div id="imageContainer" style="background-color:black">
<img id="image" src="11.jpg"/>
</div>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://jsfiddle.net/dBLsP/1/
To make it work in older browsers too you can use this:
reference