We would like to know how to create thumbnail sizing for images.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.thumbnail {<!-- www . j a va 2 s . c o m-->
display: block;
overflow: hidden;
height: 20px;
width: 20px;
}
.thumbnail img {
display: block;
height: 100%;
}
</style>
</head>
<body>
<div class="thumbnail">
<img
src="http://www.java2s.com/style/download.png">
</div>
</body>
</html>
The code above is rendered as follows: