DEV Community

Discussion on: A simple stacking context problem HOWTO

Collapse
 
alohci profile image
Nicholas Stimpson

I don't think you've understood stacking contexts correctly. Both elements, and the ::before pseudo-element are all participating in the same stacking context. While it's true that the ::before pseudo-element is creating a new stacking context, that context isn't being used at all.

Collapse
 
noneinnon profile image
Anton Baranov

Hey Nicholas,
I'll try to come up with a better example, showing the actual stacking context example working.

Thanks for pointing this out!