17
Finally found why my nav menu slid sideways on mobile last week
Went through 3 hours of debugging in my basement setup in Akron before I noticed the media query was missing the closing brace. The whole dropdown was inheriting an old float from a v2 stylesheet I deleted in 2021. Anybody else chase a phantom layout bug for hours only to find it's a forgotten bracket?
2 comments
Log in to join the discussion
Log In2 Comments
adams8212d ago
Man, same thing happened to me with a missing semicolon in my flexbox. Cost me a whole night.
5
grant56911d ago
Actually, missing semicolons usually don't break flexbox layouts. The semicolon thing is a classic JS bug, but in CSS, the browser is pretty forgiving and will just ignore the rule if you forget one. Flexbox issues are way more likely from not setting display: flex on the parent, or forgetting to add a width or flex-basis to the children. I wasted a night once because I had flex-wrap on the wrong container, not because of a semicolon. Maybe your problem was something else and you just blamed the semicolon because it was the last thing you touched.
6