Should We Stop Teaching Width and Height to CSS Beginners? episode artwork

EPISODE · May 1, 2025 · 20 MIN

Should We Stop Teaching Width and Height to CSS Beginners?

from General Musings with Kevin Powell · host Kevin Powell

The survey link (I lied, it's 3 questions, but they're all super short!): https://3g5kprf8905.typeform.com/to/laWyvkB6In this episode, I talk about why I think we should appreciate browser defaults more when writing CSS, and ended up having a mini lightbulb moment about teaching CSS - maybe we shouldn't introduce width and height properties right away to beginners? It seems like that just creates habits we have to unlearn later.I talk about how block elements naturally want to take up the full width but only be as tall as they need to be, and why working with these behaviors (instead of fighting them) makes for better responsive designs. I go on a bit of a tangent about setting constraints with min/max values rather than forcing exact dimensions.Along the way, I point out some common mistakes I see a lot - like using that universal reset with the star selector (please don't do that!) or declaring the same font-family fifteen times when you could just put it on the body once.

Episode metadata supplied by the publisher feed · Published May 1, 2025

Embed this episode

NOW PLAYING

Should We Stop Teaching Width and Height to CSS Beginners?

0:00 20:47

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of General Musings with Kevin Powell?

This episode is 20 minutes long.

When was this General Musings with Kevin Powell episode published?

This episode was published on May 1, 2025.

Can I download this General Musings with Kevin Powell episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!