I’m learning about positioning with css and something just doesn’t work; I have a content div that is holding a left-col div and a right-col. Somehow it seems that the content div is not expanding when I insert text into these columns. I don’t understand why. Can anyone help me please?
This would be the css
@charset "utf-8";
/* CSS Document */
/*structurele elementen*/
body{
margin: 0px;
}
#container{
width: 960px;
border: 2px solid #000;
margin: 0 auto;
}
#header{
width: 960px;
height: 120px;
border: 1px solid #F00;
}
#navbar{
width: 960px;
height: 40px;
border: 1px solid #0C0;
}
[B]#content{
width: 960px;
border: 1px solid #00F;
}
/*Homepage*/
#home-left {
float: left;
width: 500px;
border: 3px solid #630;
margin-left: 20px;
padding: 0 40px 0 0;
}
#home-right {
float: right;
width: 300px;
border: 3px solid #630;
margin-right: 20px;
}
[/B]
<!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>home</title>
<link href="stijlblad.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
</div>
<div id="navbar">
</div>
<div id="content">
<div id="home-left">
<h2>What is Lorem Ipsum?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div id="home-right">
<h2>What is Lorem Ipsum?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div id="clear">
</div>
</div>
<div id="footer">
hjhhjh
</div>
</div>
</body>
</html>