Page is a not externally linkable
birdbrain - 3:42 pm on Oct 4, 2010 (gmt 0)
Hi there greencode,
I probably mislead you with my original code as I wrote it to in response to this...
The problem is I don't want a right-margin on the last div in the line otherwise
it won't fit it's containing area and gets pushed down on to the following line.
I would normally have resolved the problem like this...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>ten boxes in a row</title>
<style type="text/css">
#container {
width:1012px;
padding:10px 0 0 10px;
border:1px solid #000;
margin:auto;
overflow:hidden;
}
#container div {
float:left;
width:241px;
padding:5px 0;
border:1px solid #600;
margin:0 10px 10px 0;
background-color:#fee;
text-align:center;
}
</style>
</head>
<body>
<div id="container">
<div>box one</div>
<div>box two</div>
<div>box three</div>
<div>box four</div>
<div>box five</div>
<div>box six</div>
<div>box seven</div>
<div>box eight</div>
<div>box nine</div>
<div>box ten</div>
</div>
</body>
</html>
birdbrain