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. 11th 2018

Modern CSS for Backend Developers: Make It Sticky

Episode 15 Run Time 4:30

Download

Consider the common example of a heading that should remain fixed to the top of the page until the next section becomes visible. Traditionally, developers have resorted to JavaScript to allow for this. However, these days, we can tackle it with basic CSS. And when I say basic, I mean two properties and you're done.