DEV Community

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

Collapse
 
vladi160 profile image
vladi160

For margin-left/right u need to remove it for the :first/last-child and use float, which is the old way. Much better is with flex

Collapse
 
receter profile image
Andreas Riedmüller

Yes, especially now that gap for Flexbox is finally supported in all major browsers. Sometimes I use inline-block for simple cases to save a container element. I don’t use float for this.