ChrisB: martin-top fehlt - was bedeutet offset?

Beitrag lesen

Hi,

Die Begründung heißt "collapsing Margins". Der top-margin der H1 wird mit dem top-margin des Eltern-DIVs zusammengefasst und dem DIV zugerechnet, deswegen erscheint er nur als Offset bei der Überschrift.
Hm, aber warum kommt dann überhaupt kein margin? Ich hatte bisher gedacht, dass "collapsing" bedeutet, dass der größere margin genutzt wird?!

Collapsing Margins umfassen noch mehr als nur das:
"The top margin of an in-flow block-level element is adjoining to its first in-flow block-level child's top margin if the element has no top border, no top padding, and the child has no clearance."

MfG ChrisB

--
„This is the author's opinion, not necessarily that of Starbucks.“