L
6

I spent 4 hours trying to center a div

I was building a simple profile card for my first project and the text just would NOT line up in the middle. I tried everything I saw online, like 'margin: auto' and 'text-align: center'. It turns out I had a typo in my CSS class name, so the style rule wasn't even being applied. I only found it after I opened the browser's developer tools and saw the class was crossed out. That feeling when I fixed the spelling and it just snapped into place was AMAZING. Has anyone else lost a huge chunk of time to a tiny spelling mistake like that?
3 comments

Log in to join the discussion

Log In
3 Comments
riley_garcia
But isn't that how you really learn the details?
8
piper470
piper4701mo ago
My worst one was a missing semicolon in JavaScript.
3
wendy_murphy16
My friend spent two days debugging a script before finding a missing semicolon. He was checking database connections and everything. The fix took half a second after all that.
6