1
Spent 3 hours trying to center a div in my first project and it just would NOT work
I followed a tutorial from a site called Codecademy exactly, but my text kept floating left no matter what I tried. Turns out I had a missing semicolon in a completely different CSS rule that broke everything. How do you even start debugging something like that when you're brand new?
4 comments
Log in to join the discussion
Log In4 Comments
kelly_rivera13d ago
Wait, so you spent 3 whole hours on a div and it turned out to be a random semicolon ghost somewhere else? That's like checking your car engine and finding out the radio was unplugged lmao. @margaretr76's trick about commenting out chunks is spot on though, when I was learning I would literally just start deleting lines one by one until the page started working again. The worst part is when you fix the semicolon and then realize you have no idea how the chain of events actually broke it in the first place. Honestly, missing semicolons are the universe's way of telling you to take a break and drink some water lol.
5
sam_cooper1mo ago
Ugh, doesn't that just feel like the worst? You follow the steps and it still blows up on you. How is a missing semicolon somewhere else even your first guess when you're starting out? Margaret's trick about commenting out chunks is honestly the only way I survived my first few projects. You just start shutting things off until it works again, then you know where the fire is.
3
margaretr761mo ago
Oh man the missing semicolon thing is a classic. When I was new I just started commenting out chunks of css with / / until the problem stopped, then you know which part to check.
1