Slim: Footer / clear:both und margin-top machen Probleme

Hallo,

hier das Prinzip eines dreispaltigen Layouts und einem sog. Footer;
leider lässt sich für den Footer kein "margin-top festlegen, um oben einen Abstand zu den Spalten einzurichten; er klebt direkt unter den drei Spalten und rührt sich keinen Pixel.

Warum ist das so - und wie kann ich das Problem (wenn es denn eines ist und nicht ICH das Problem bin ...) beheben ?

///////////////////////////////////////////

<div id="spalte1" style="float:left;margin-right:10px">spalte1</div>
<div id="spalte2" style="float:left;margin-right:10px">spalte2</div>
<div id="spalte3" style="float:left;margin-right:10px">spalte3</div>

<div id="footer" style="clear:both;margin-top:20px">footer</div>

///////////////////////////////////////////

PS: alle Browser und alle Doctypes zeigen gleiches Verhalten.

Mfg Slim

  1. Hoi

    <div class="wrapper">

    <div id="spalte1" style="float:left;margin-right:10px">spalte1</div>
    <div id="spalte2" style="float:left;margin-right:10px">spalte2</div>
    <div id="spalte3" style="float:left;margin-right:10px">spalte3</div>

    <div style="clear:both;line-height:1px;height:1px;"></div>
    </div>

    <div id="footer" style="clear:both;margin-top:20px">footer</div>

    Sollte das ganze so darstellen, wie du es wünscht.

    Gruß Ben