It's not hard.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aboutghosts Example</title>
<link rel="stylesheet" type="text/css" href="css/default.css">
</head>
<body>
<div class="container">
<div id="Foo" class="contentbox">content box 3</div>
<div id="Bar" class="contentbox">content box 4</div>
<div id="Baz" class="contentbox">content box 1</div>
<div id="Comments" class="contentbox">
<p>content box 2</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Tons of comments here</p>
</div>
</div>
</body>
</html>
If you want to give something a unique name, use the "id" attribute, not "class". "Comments" was the only element with an obvious name; the others currently have stand-in names. You want to use something descriptive of what the element is.
default.css:
Code:
.container {
overflow: auto;
}
.contentbox {
float: right;
}
#Foo, #Baz {
width: 5em;
}
#Bar, #Comments {
width: 10em;
}
#Baz {
clear: both;
}
Note the use of ems rather than px.