CSS isn't magic

Share this post

Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!

cssisntmagic.substack.com

Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!

Stas Melnikov
Mar 15, 2023
1
Share
Share this post

Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!

cssisntmagic.substack.com
Code #1 shows top: 0, right: 0, bottom: 0 and left: 0. Code #2 is a short alternative to code #1 because I use inset: 0

Did you use the top, right, bottom and left properties to stretch elements over the full width and height of the parent? 🤔 Reduce it to one line with the inset property 🥳

P.S.
❤ Thank you so much, my sponsors: Ben Rinehart, Tatiana Ten

1
Share
Share this post

Reduce top: 0; right: 0; bottom: 0; left: 0 to one line!

cssisntmagic.substack.com
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Stas Melnikov
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing