yusuf: Probleme mit DIV


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.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:#d7d7d7}
#main {width:900px;height:300px;background-color:#b0b0f0;margin:auto}
#md {width:800px;height:250px;background-color:#f0b0f0;margin:auto}
#d1 {float:left;width:80px;height:200px;background-color:#f0b0b0;text-align:left}
#d2 {width:500px;height:200px;background-color:#b0f0b0;margin:auto;text-align:left}
#d3 {float:right;width:80px;height:200px;background-color:#f0f0b0;text-align:left}
</style>
</head>

<body>

<div id="main">
<div id="md">
<div id="d1">LEFT</div>
<div id="d2">MIDDLE</div>
<div id="d3">RIGHT</div>
</div>
</div>

</body>
</html>
-----------------------

Das rechte kleine DIV steht nicht richtig.
Was ist falsch?

Danke im Voraus.

  1. hallo yusuf,

    Das rechte kleine DIV steht nicht richtig.
    Was ist falsch?

    Das rechte kleine DIV

    Grüße aus Berlin

    Christoph S.

    --
    Visitenkarte
    ss:| zu:) ls:& fo:) va:) sh:| rl:|
    1. Das rechte kleine DIV

      Grüße aus Berlin

      Christoph S.

      Danke, Christoph!

      Weiß vielleicht jemand, wie man das korrigieren kann?

  2. hi,

    Das rechte kleine DIV steht nicht richtig.

    Schon mit V1AGRA versucht ...?

    gruß,
    wahsaga

    --
    /voodoo.css:
    #GeorgeWBush { position:absolute; bottom:-6ft; }
    1. haha jetz ham wir alle gelacht

      was für ein kalauer

  3. Hallo Yusuf,

    #main {width:900px;height:300px;background-color:#b0b0f0;margin:auto}

    #md {width:800px;height:250px;background-color:#f0b0f0;margin:auto}
    #d1 {float:left;width:80px;height:200px;background-color:#f0b0b0;text-align:left}
    #d2 {width:500px;height:200px;background-color:#b0f0b0;margin:auto;text-align:left}
    #d3 {float:right;width:80px;height:200px;background-color:#f0f0b0;text-align:left}

      
    
    > ~~~html
    
    <div id="main">  
    
    >   <div id="md">  
    >     <div id="d1">LEFT</div>  
    >     <div id="d2">MIDDLE</div>  
    >     <div id="d3">RIGHT</div>  
    >   </div>  
    > </div>
    
    

    Das rechte kleine DIV steht nicht richtig.

    Doch, tut es.

    Was ist falsch?

    Die Umsetzung. ;-) Die Oberkante des rechten gefloateten Elements darf nicht nicht höher stehen als die Unterkante des zuvor nicht gefloateten Elements, weil … http://www.w3.org/TR/CSS21/visuren.html#propdef-float … ich mich um die genaue Erklärung drücke. Floats sind im wahrsten Sinne des Wortes unerklärlich.

    #d1 {float:left;width:80px;height:200px;background-color:#f0b0b0;text-align:left}  
    #d2 {width:500px;height:200px;background-color:#b0f0b0;margin:0 70px;text-align:left;float:left;}  
    #d3 {float:left;width:80px;height:200px;background-color:#f0f0b0;text-align:left}
    

    Grüße
     Roland

  4. » <div id="md">

    <div id="d1">LEFT</div>
    <div id="d2">MIDDLE</div>
    <div id="d3">RIGHT</div>
    </div>

    Das rechte kleine DIV steht nicht richtig.
    Was ist falsch?

    Hallo Yusuf,

    ungetestet: vertausche d2 und d3, dann sollte es funktionieren.

    Claus