<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 1px solid black;
width: auto;
}
</style>
</head>
<body>
<div>
<img src = "http://www.flowerpicturegallery.com/d/1977-3/yellow+daisy+flower+picture.jpg">
</div>
</body>
</html>
I use the above code to display an image. Code works good excepct two facts: 1) How can I make the div's width fit the image (stop where image stops)? I tried width: auto;
or width: 100%;
but none of them works... And 2) why is there a very small blank area at the bottom and how can I fix this?