The hidden answers


Hello Reader,

Sometimes you run into a CSS problem, and you do everything right, but still can't figure out what is going on.

You don’t pile on Band-Aids. You stop and think about why it’s happening. You narrow it down to a specific question. You search for an answer.

And you get nothing.

This happened to one of my students a while back. They added padding to an element, and that padding covered the text of the paragraph above it.

They played around with it and tried a few different things. Same result every time. Being able to reproduce the issue like this, it was clearly an intentional behavior, but why?

They stopped, thought about it, tried to figure out why.

They searched for box model information and didn’t come across the answer.

They looked up padding specifically. Still nothing.

They searched the MDN, W3Schools, and even took the time to read parts of the CSS spec in hopes of figuring out what the heck was going on.

They did everything right. They didn't pile on fixes, but couldn't come up with a solution.

Even the most up-to-date AI models are of no help.

None of Claude’s answers here helps in any way, and the “throw a z-index on there” is really one of those shots in the dark, hoping for the best type of things that we might try as a last resort.

The answer? They needed to look up inline formatting context.

But how were they supposed to know that? Nobody talks about inline formatting contexts. It's not in any beginner or intermediate tutorial. It's not something AI is going to surface because no tutorials or Stack Overflow answers talk about it, so it has no idea that's the answer either.

It's one of those foundational pieces of how the browser actually renders CSS that almost nobody teaches, but that changes everything once you understand it.

This is the kind of knowledge gap that no amount of Googling or prompting will fill, because when you don't know about it, you don't know that's where you need to look for the answer.

That's the kind of gap CSS Demystified is built to close.

Not by covering every property (there are too many), but by teaching you how CSS actually works, and diving into the layer underneath the properties that govern how everything behaves.

Once you have that, you stop running into invisible walls. You know where to look, or better yet, you already understand why something is happening before you even need to look it up.

"I now view CSS as a complex language in its own right which can be leveraged once it is well understood."Joe Sheridan CSS Demystified alum (v1)
"If they wanted to learn how the browser actually applies CSS, they should start here."thecodeviking CSS Demystified alum (v1)

And remember, you can get 20% off the new version of CSS Demystified through April 7th. After that, the doors will stay open, but at the full price of $199 instead of $159.

Enroll now

(If you’re in a country where I support purchasing power parity, the best available discount is applied automatically at checkout, whichever is higher between that and the launch coupon.)

If you're on the fence, or have any questions, please hit reply and ask away. And if you're curious about the entire curriculum, you can find it here.

Cheers,
Kevin

P.S. Also, there are already more modules in the works, with the next one being Writing Resilient CSS. If you enroll now, you'll get all the future modules for free, but the price will go up as more content is added.

P.S. If you’d like to stop hearing about CSS Demystified and stay on my regular Sunday list, click here.


Unsubscribe · Preferences
600 1st Ave, Ste 330 PMB 92768, Seattle, WA 98104-2246

Hi! I'm Kevin

Weekly newsletter, where I talk about tangentially-related front-end development topics and share what I've been up to in the last week, plus any cool/fun/interesting/useful links I come across as well.

Read more from Hi! I'm Kevin

Hello Reader, Yesterday I told you about the mindset shift that changed everything for me, and how I started working with the browser instead of against it. I’ve spent a long time figuring out how to pass that same shift on to others, and that’s why I created CSS Demystified, which is now open for enrollment. Before I get into the details, I want to tell you why I built it the way I did. I spent five years teaching in a classroom before I moved to online education full-time. And the thing...

Hello Reader, Creating websites was a hobby of mine for a long time. I started making my first sites in the late 90s with Photoshop slicing, table layouts, and image maps. I never thought writing HTML and CSS would become such an important part of my life. After a wandering path of unrelated degrees, I ended up as a graphic designer at a small agency. I loved it, but the pay was terrible, so I started freelancing on the side as well, mostly designing websites. After a few jobs, I figured that...

Hello Reader, A couple of days ago, I talked about how CSS is designed for uncertainty, meant to adapt to unknowns. When we don’t think about it that way, we fight it. And when we fight it, things get messy fast. We add what seems like an innocent enough property, but it doesn't quite fix things the way we wanted, so we add another. Then another. Then another. By the end of it, somehow, everything is worse than when we started. Once again, there's a meme that does a good job of showing how...