T
16

Found out my grandma's old recipe blog has a CSS bug that hides half the ingredient list on mobile

I was looking up her molasses cookie recipe last night on my phone and noticed the ingredients just stopped after the butter. I figured she'd left it unfinished, but then I checked on my desktop and the full list appeared. Turns out a stupid float property is collapsing the container on narrow screens. Has anyone else run into old family blogs held together with spaghetti code?
2 comments

Log in to join the discussion

Log In
2 Comments
robinmason
robinmason22h agoTop Commenter
Clearfix would work, yeah. @faithrodriguez called it right, that's almost always the issue with these old float-based layouts. Patched mine with a quick overflow hidden and the cookies came through.
4
faithrodriguez
Well, did you try adding a clearfix to that container? That's usually the culprit with collapsing floats, especially on older code that didn't account for responsive layouts. I've seen a lot of family sites from the late 2000s that rely on fixed widths and floats without any thought for mobile. It's kind of charming in a way, like digital archaeology, but frustrating when you just want a cookie recipe. Did you end up fixing the CSS, or did you just bookmark the desktop version and call it a day?
1