Hallo,
ich werde aus folgender Sache nicht schlau: Der Hintergrund #333 für den Footer funktioniert nicht. Lasse ich das clear:both weg ist zwar der Hintergrund für den Footer richtig, aber der Hintergrund für #wrap ist weg.
Wo liegt mein Denkfehler?
HTML-Code:
<!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>Test</title>
<style type="text/css">
<!--
body {
background-color: #333333;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
}
#wrap {
width: 960px;
margin: 0px auto 0px;
background: #CCCCCC;
}
#footer {
background: #333333;
margin: 0px auto 0px;
width: 940px;
}
#footer .block {
width: 260px;
margin: 25px;
float: left;
}
#footer .block p {
color: #fff;
font-size: 14px;
line-height: 150%;
}
-->
</style>
</head>
<body>
<div id="wrap">
<div id="footer">
<div class="block">
<p>Absatz1</p>
</div>
<div class="block">
<p>Absatz 2
</p>
</div>
<div class="block">
<p>Absatz 3 </p>
</div>
</div><!-- end footer -->
<br style="clear: both;">
</div><!-- end wrap -->
</body>
</html>