Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Style last div


birdbrain - 10:16 am on Jul 19, 2010 (gmt 0)


Hi there greencode,

as you have not supplied your actual code, the best that I can do is give you a basic example...


<!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>four boxes in a row</title>

<style type="text/css">
#container {
width:1002px;
padding:10px;
border:1px solid #000;
margin:auto;
overflow:hidden;
}
#container div {
float:left;
width:241px;
padding:5px 0;
border:1px solid #600;
margin-right:10px;
background-color:#fee;
text-align:center;
}
#container div+div+div+div {
margin-right:0;
}
</style>

</head>
<body>

<div id="container">
<div>box one</div>
<div>box two</div>
<div>box three</div>
<div>box four</div>
</div>

</body>
</html>


...and hope that it helps. ;)

birdbrain


Thread source:: http://www.webmasterworld.com/css/4172531.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com