How to make a sticky block using CSS only

Posted by admin on Tue, 06/06/2017 - 08:33

Making one of the block sticky within its parent (or body) is not a painful thing anymore.
Just use CSS position: sticky and you'll be happy!

Check this out:

See the Pen zGYXEX by Preethi Ranjit (@rpsthecoder) on CodePen.

Please note, that this is working for all browsers except IE/Edge, so for Microsoft browser you'll have to use a JS library like this: https://github.com/wilddeer/stickyfill

Tags: 
×

Hey! Don't miss a new cool stuff!

Add new comment