Hi, I've a XHTML structure like this:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>Titel</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="Seite" class="bgr">
<div id="Titel" class="bgr">
<h1>some titel</h1>
</div>
<div id="Mitte" class="bgr">
<div id="Navigation" class="bgr">
<ul>
<li><a href="link.html" class="aktiv"><img src="text.gif" alt="[Link]" /></a></li>
</ul>
</div>
<div id="Inhalt" class="uebersicht bgr">
Content
</div>
</div>
<div id="Fusszeile" class="bgr">
</div>
</div>
</body>
</html>
"Titel" and "Fusszeile" are both block elements (display:block;
). The additional container div "Mitte" is mainly there for margin/padding and background image reasons. The CSS for "Navigation" and "Inhalt" looks like this:
div#Navigation {
float: left;
}
div#Inhalt {
margin: 0 0 1em 185px;
padding: 0 1em;
}
The result is that the floating navigation list sticks out of the "Mitte" div. How can I fix this?