Thomas J.: Tabellenlayout mit <div>s

Beitrag lesen

Ich nochmal

Code:
<div style="width:300px; background-color: green;">
   <span style="float: left; width: 100px; margin-right:-3px">Bild</span>

Das ist schon mal falsch. <span> ist ein Inline-Element. Da sind keine Breitenangaben erlaubt.

<div style="width:200px; height: 100%; background-color: blue;">
      Text Text Text Text Text Text
      Text Text Text Text Text Text
      Text Text Text Text Text Text
      Text Text Text Text Text Text
   </div>
</div>

Außerdem hast Du mich etwas falsch verstanden. Du brauchst nur zwei divs.

So z.B.:

<div style="width:300px; background:blue">
 <div style="width:200px;float:right;background:red">
  <p style="margin:0;">Text Text Text Text Text Text<br>
  Text Text Text Text Text Text<br>
  Text Text Text Text Text Text<br>
  Text Text Text Text Text Text</p>
 </div>
 Wenig Text
 <div style="clear:right"></div>
</div>

Ich habe das jetzt nur auf die Schnelle mit Opera getestet. Es sollte aber auch mit Mozilla klappen.
Was der IE daraus macht, möchte ich gar nicht erst wissen ;) Möglicherweise mußt Du "Wenig Text" noch extra formatieren, z.B. <p style="width:100px;margin:0;float:left">Wenig Text</p>

Thomas J.