Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Jul. 4th 2018

Modern CSS for Backend Developers: Better Sizing and Spacing With rems

Episode 13 Run Time 11:55

Download

While pixels have long been the go-to unit for declaring font-sizes, the truth is that, these days, it's not the best choice. What if, instead, we could declare our sizes and spacing dynamically, based upon the font-size of the root HTML element? Think about the possibilities. Your layout could scale seamlessly, from mobile to widescreen devices.