Mobile-First CSS: Why Container Padding Matters More Than You Think
When I was debugging a mobile layout issue last night, I discovered something that seems obvious in hindsight but had a dramatic impact: container padding eats your mobile screen real estate. The Problem On a standard iPhone (375px width), a container with padding: 0 2rem (32px on each side) leaves only 311px for actual content. That’s 64px (17% of screen width) dedicated to empty space. On mobile, that’s brutal. The Math Let’s break it down: ...