Magial
03-19-2004, 03:22 PM
Im trying to make different types of boxes for my links, instead of it all being in one column. But the boxes go side by side of each other, instead of on top of each other.
Heres my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<div id="container">
<div id="header">
This is header, this is header, this is header, this is header, this is header!!
</div>
<div id="boxleft">
<h2>Navigation</h2>
<ul>
<td>Link One</td><br>
<td>Link Two</td><br>
<td>Link Three</td>
</ul>
</div>
<div id="boxleft">
<h2>Other links</h2>
<ul>
<td>Link One</td><br>
<td>Link Two</td><br>
<td>Link Three</td>
</ul>
</div>
<div id="boxright"> </div>
<div id="content"> </div>
<div id="footer">
This is footer, this is footer, this is footer, this is footer, this is footer!
</div>
</div>
</body>
</html>
And the stylesheet:
#container {
width: 760px;
\width: 780px;
w\idth: 760px;
border: 1px solid gray;
margin: 10px;
margin-left: auto;
margin-right: auto;
padding: 10px;
}
#header {
padding: 5px;
margin-bottom: 5px;
background-color: rgb(213, 219, 225);
}
#content {
padding: 5px;
margin-left: 215px;
margin-right: 215px;
background-color: gray;
}
#boxleft {
float: left;
width: 200px;
\width: 210px;
w\idth: 200px;
margin: 0;
margin-right: 5px;
padding: 5px;
background-color: rgb(235, 235, 235);
}
#boxright {
float: right;
width: 200px;
\width: 210px;
w\idth: 200px;
margin: 0;
margin-left: 5px;
padding: 5px;
background-color: rgb(235, 235, 235);
}
#footer {
clear: both;
padding: 5px;
margin-top: 5px;
background-color: rgb(213, 219, 225);
}
Heres my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<div id="container">
<div id="header">
This is header, this is header, this is header, this is header, this is header!!
</div>
<div id="boxleft">
<h2>Navigation</h2>
<ul>
<td>Link One</td><br>
<td>Link Two</td><br>
<td>Link Three</td>
</ul>
</div>
<div id="boxleft">
<h2>Other links</h2>
<ul>
<td>Link One</td><br>
<td>Link Two</td><br>
<td>Link Three</td>
</ul>
</div>
<div id="boxright"> </div>
<div id="content"> </div>
<div id="footer">
This is footer, this is footer, this is footer, this is footer, this is footer!
</div>
</div>
</body>
</html>
And the stylesheet:
#container {
width: 760px;
\width: 780px;
w\idth: 760px;
border: 1px solid gray;
margin: 10px;
margin-left: auto;
margin-right: auto;
padding: 10px;
}
#header {
padding: 5px;
margin-bottom: 5px;
background-color: rgb(213, 219, 225);
}
#content {
padding: 5px;
margin-left: 215px;
margin-right: 215px;
background-color: gray;
}
#boxleft {
float: left;
width: 200px;
\width: 210px;
w\idth: 200px;
margin: 0;
margin-right: 5px;
padding: 5px;
background-color: rgb(235, 235, 235);
}
#boxright {
float: right;
width: 200px;
\width: 210px;
w\idth: 200px;
margin: 0;
margin-left: 5px;
padding: 5px;
background-color: rgb(235, 235, 235);
}
#footer {
clear: both;
padding: 5px;
margin-top: 5px;
background-color: rgb(213, 219, 225);
}