Kuno: Problem mit overflow:auto

Beitrag lesen

Im Beispiel überlappt der graue Block den Gelben. Eigentlich soll der graue aber KOMPLETT IM GELBEN DRIN SEIN, ohne dass der grüne block vom gelben verdeckt wird.

hier nochmal den Copy&Paste-Code:

  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
  
<html>  
 <head>  
  <style type="text/css">  
   body {  
    background-color:red;  
   }  
  
   div#menuleiste {  
    background-color:white;  
    overflow:auto;  
   }  
  
   div#box {  
    background-color:green;  
    position:absolute;  
    top:1em;  
    height:5em;  
   }  
  
   div#content {  
    background-color:yellow;  
    padding:2em;  
    border:2px solid blue;  
   }  
  
   dl {  
    float:left;  
    width:10em;  
    background-color:gray;  
    margin:0.5em;  
   }  
  
  </style>  
  
 </head>  
 <body>  
  
  <div id="menuleiste">Dies ist ein Menue mit <div id="box">Ueberhang</div></div>  
  <div id="content">  
   <dl>  
    <dt style="float:left">Foto</dt>  
    <dd style="float:left">Beschreibung des Fotos</dd>  
   </dl>  
  
  </div>  
 </body>  
</html>