:after and :before only apply to container elements

This is a fun fact for all of you CSS heads out there that I didn’t realize until this morning: The :before and :after pseudo elements only can be applied to containing elements, which makes sense, but hasn’t been something I’ve come across yet.

While the button tag, which is a container and can have elements slipped inside it, an input[type=button] cannot.

Check out this long Stack here for even more information

I am Dan Griffin and you can find me on Mastodon
CSS

The Blog

Always Taking Inquiries

At the moment I am not taking on many new projects, but am still available for inquiry or questions.

Reach Out To Dan