21
Rant: Just realized I was using CSS margins wrong for like 6 months
I was building this personal project site for my dog grooming shop and kept wondering why my layout looked like garbage. Elements were all over the place, overlapping, it was a mess. I thought I was just bad at CSS or something. Then last week I was watching a tutorial and the guy said 'never use margin-top on everything, use flexbox gap instead.' I literally paused the video and just sat there for a minute. All that time I was stacking margins on top of each other making a complete disaster. My footer was floating in the middle of the page for months and I couldn't figure out why. Has anyone else had that moment where you just realize the one dumb thing you've been doing the whole time?
2 comments
Log in to join the discussion
Log In2 Comments
jana_hernandez17d ago
Yeah I spent a whole year just slapping margin-bottom on everything and wondering why my site looked like a disaster.
5
william_taylor16d ago
Those margin-bottom fixes always snowball into something way worse. One month of lazy CSS can take a week to untangle. Hard learned that one myself on a side project.
8