First of all, you forgot to close a div! It has to be:
HTML Code:
<div id="profilewrap">
<div id="block12">
STUFF
<div id="leftblock"></div>
<div id="righblock"></div>
</div>
</div>
Secondly, in XHTML every element has to be closed, so:
HTML Code:
<link rel="stylesheet" type="text/css" href="css.css" />
Now to resolve your problem with the overlapping div, you can add an element at the bottom of the container div, and give that element with css the property "clear:both; ".
For example, a break-element:
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>No Title</title>
<link rel="stylesheet" type="text/css" href="css.css" />
</head>
<body>
<div id="profilewrap">
<div id="block12">
STUFF
<div id="leftblock"></div>
<div id="righblock">
</div>
<br class="clearer">
</div>
</div>
</body>
</html>
CSS:
Code:
.clearer {
clear:both;
}
Last edited by bas; 02-17-2008 at 03:13 PM..
|