Gunnar Bittersmann: css float=left verhält sich als hätte es clear=both

Beitrag lesen

@@Marcus C

in diesem kleinen fiddle

Siehe dieses PS.

wieso rutscht Block 3 weiter runter, je höher Block 2 wird?

Wegen “If the current box is left-floating, and there are any left-floating boxes generated by elements earlier in the source document, then for each such earlier box, either the left outer edge of the current box must be to the right of the right outer edge of the earlier box, or its top must be lower than the bottom of the earlier box.” [CSS 2.2]

Ich möchte erreichen, dass Block 3 direkt unter Block 1 steht.

Mit CSS allein wird das nicht gehen. Aber mit JavaScript. (Neulich gesucht und gefunden.)

LLAP 🖖

--
Ist diese Antwort anstößig? Dann könnte sie nützlich sein.