Andi: Firefox Overflow (Float) Bug?

Beitrag lesen

Ich denke ich habe die Lösung gefunden, auch wenn mir der Ansatz nicht 100%ig gefällt. Das W3C sagt in der CSS 2.1 Definition:
-------
9.4.1 Block formatting contexts

Floats, absolutely positioned elements, inline-blocks, table-cells, and elements with 'overflow' other than 'visible' establish new block formatting contexts.

In a block formatting context, boxes are laid out one after the other, vertically, beginning at the top of a containing block. The vertical distance between two sibling boxes is determined by the 'margin' properties. Vertical margins between adjacent block boxes in a block formatting context collapse.
-------

Das heißt also, dass der Firefox mal wieder der einzige ist, der es eigentlich richtig macht. Damit also eine Entschuldigung an das gute Stück. Um das ganze praktisch doch einsetzen zu können, habe ich also einfach einen weiteren Div-Container um den Inhalt gezogen und das "overflow"-Attribut auf den inneren Container gelegt. Nicht schön, aber es funktioniert in allen gängigen Browsern.

Gruß
Andi