View Single Post
Old 03-02-2023, 03:22 AM   #2
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 55
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
What you see is called collapsing margins, and it's a feature of CSS: Basically it happens here because the margin property refers to the distance from the other element's content, not its margin (that is, because the top and bottom margins are the same, the distance between the contents doesn't change).

There are a few ways you can fix this - what works best depends a bit on your layout. You could set bottom-margin: 2em; or add autoflow: auto; into your style, or you could use padding-top; and padding-bottom; instead of margin. Try out what looks best in your case - each of these has a slightly different effect on the layout.
Lukusaukko is offline   Reply With Quote