DEV Community

Discussion on: Why I fell in love with margin-top

Collapse
 
receter profile image
Andreas Riedmüller

I did use margin-bottom for some time and it has most of the advantages. Especially #1 (less code navigation) was what convinced me to switch.

You mean ~ *:not(br) right? You can also go with + br + * which is easier to understand.

Of course, with margin-bottom you don’t need the + cominator, but you will have a harder time if you have various preceding elements that need different spacing.

What are the advantages of margin-bottom that conviced you? Let me know!