Axel Richter: DIV oder SPAN nebeneinander in einem DIV

Beitrag lesen

Hallo,

Nun sollen sowohl ein Logo als auch ein Mini-Bild in jedem Angebots-DIV oben links und oben rechts plaziert werden:

|-------------|  |-------------|  |-------------|
||----|   |--||  ||----|   |--||  ||----|   |--||
||    |   |  ||  ||    |   |  ||  ||    |   |  ||
||----|   |--||  ||----|   |--||  ||----|   |--||
|             |  |             |  |             |
|Text         |  |Text         |  |Text         |
|             |  |             |  |             |
|-------------|  |-------------|  |-------------|

Per <tabelle> kein problem, aber ich suche eine CSS-Lösung.

Solange nur zwei Bilder innerhalb eines Bereichs links und rechts stehen sollen und darunter Text, ist das auch mit CSS kein Problem ;-)

<div style="width:200px; border:1px solid black; float:left; margin:5px;">
  <img src="logo.gif" style="width:100px; height:100px; float:left;" alt="logo">
  <img src="bild.gif" style="width:50px; height:50px; float:right;" alt="bild">
<p style="clear:both;">Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text</p>
</div>

Problematisch wird die unterschiedliche Auslegung des Floatens von Blocklevel-Elementen. Da gibt es zwischen MSIE und den standardkonformen Browsern große Unterschiede.

viele Grüße

Axel