- 1,645
Hello, just doing a simple site for a friend and I'm trying my best to use semantic code for good practice. My only problem at this point is that the wrapper doesn't want to wrap around whatever's in it. Here's the file:
P.S. yeah, I know it's not XHTML compliant, but I'm going to go back through later and fix it. Here's a screenshot of what I'm seeing:
Also, any tips on organizing CSS and DIV tags in the future would also be apreciated.
Thanks!
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Testing CSS Positioning</title>
<style type="text/css">
body {
font-family: Verdana, Tahoma, "Trebuchet MS";
color: #000000;
}
h6 {
font-size: 1em;
}
h5 {
font-size: 1.1em;
}
h4 {
font-size: 1.2em;
}
h3 {
font-size: 1.3em;
}
h2 {
font-size: 1.4em;
}
h1 {
font-size: 1.5em;
}
#wrapper {
width: 645px;
margin: 0px 0px 0px 100px;
border: 2px solid #C0C0C0;
}
#sidebar1 {
width: 190px;
min-height: 500px;
border-right: 2px solid #C0C0C0;
float: left;
}
#main {
width: 450px;
height: auto;
float: left;
}
.content {
width: 400px;
height: auto;
margin-left:25px;
}
#adspace_site {
text-align: center;
}
#header {
border-bottom: 2px solid #C0C0C0;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>[--HEADER--]</h1>
</div>
<div id="sidebar1">
<ul><li>link</li><li>link</li><li>link</li></ul>
</div>
<div id="main">
<div id="adspace_site"><h3>Ads Go here</h3></div>
<div class="content"><h1>Untitled</h1>
<p><h6>Lorem ipsum dolor sit amet.</h6></p></div>
</div>
</div>
</body>
</html>
P.S. yeah, I know it's not XHTML compliant, but I'm going to go back through later and fix it. Here's a screenshot of what I'm seeing:
Also, any tips on organizing CSS and DIV tags in the future would also be apreciated.
Thanks!