Saturday, August 17, 2013

CSS float left

<html>
<head>
<style type="text/css">
.thumbnail
{
float:left;
width:110px;
height:90px;
margin:5px;
}
</style>
</head>

<body>
<h3>Image Gallery</h3>
<p>Try resizing the window to see what happens when the images does not have enough room.</p>
<img class="thumbnail" src="flower_01.jpg" width="107" height="90">
<img class="thumbnail" src="flower_02.jpg" width="107" height="80">
<img class="thumbnail" src="flower_03.jpg" width="116" height="90">
<img class="thumbnail" src="flower_04.jpg" width="120" height="90">
<img class="thumbnail" src="flower_01.jpg" width="107" height="90">
<img class="thumbnail" src="flower_02.jpg" width="107" height="80">
<img class="thumbnail" src="flower_03.jpg" width="116" height="90">
<img class="thumbnail" src="flower_04.jpg" width="120" height="90">
</body>
</html>

Result


No comments: