We would like to know how to fit image border tight to image within img tag.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#photo {<!-- w ww. j av a2 s. c om-->
position: absolute;
border: 1px solid red;
line-height: 0;
}
</style>
</head>
<body>
<div id="photo">
<img src="http://www.java2s.com/style/download.png"
alt="Picture" style="width: 250px; height: 180px" />
</div>
</body>
</html>
The code above is rendered as follows: