Float from left one by one
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CSS Positioning Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style rel="stylesheet" type="text/css">
div {
width: 500px;
}
div,h1,p {
font-family: arial, verdana, sans-serif;
border: 1px solid #000000;
margin: 5px;
}
p {
float: left;
width: 150px;
}
</style>
</head>
<body>
<div id="page">
<h1>Heading One</h1>
<p>This is paragraph one. It should appear on the left.</p>
<p>This is paragraph two. It should appear in the middle.</p>
<p>This is paragraph three. It should appear on the right.</p>
</div>
</body>
</html>
Related examples in the same category