CSS Units: Stuff I wish Someone Had Told me
CSS Units: Stuff I Wish Someone Had Told Me CSS Units: Stuff I Wish Someone Had Told Me May 19, 2025 • Running on: caffeine overload & regret Damn it. I just wasted another weekend fixing a website because I screwed up the CSS units. AGAIN. Can I confess something? I've been building websites for over 10 years, and I *still* get confused about when to use px vs rem vs em. It's embarrassing. Like, I should know this stuff by now, right? So last month I built this site for a law firm. Everything looked perfect... on MY screen. Then the client calls me all angry: "Your website's broken!" Turns out he had his browser font cranked way up, and my beautiful layout was a total mess - buttons overlapping text, things running off the screen, a complete disaster. Yeah, I know. Totally preventable. So I'm writing this down partly to get it straight in my own head, and partly in case you're makin...