D
24

My CSS class name typo cost me a whole Saturday

I'm a total beginner, been learning HTML and CSS for about 3 months now. My site sidebar was collapsing on mobile no matter what I did. I rewrote the media query three times, tried different breakpoints, even switched to flexbox from grid. Turns out it was a stray closing div tag left from an old tutorial I had copied. The browser was nesting things weirdly. I only found it when I ran the page through a validator and it flagged mismatched tags. That was last Tuesday, and now I always run validators before touching my layout again. Does anyone else rely on validators or do you just visually hunt for missing closers?
1 comments

Log in to join the discussion

Log In
1 Comment
abby_henderson
abby_henderson19d agoMost Upvoted
Debugging by trial and error is just paying for a lesson in humility.
2