DEV Community

Cover image for Sticky Section Headers
Aileen Rae
Aileen Rae

Posted on

4 1

Sticky Section Headers

Hi folks! I threw together a Codepen to demo using position: sticky to "stick" section headers to the side of the screen while scrolling long blocks of content.

This layout pattern could be used for a list of blog posts, comments on a single blog post, or for keeping share buttons in view on long article pages. It could also be used for an instant messaging layout to "stick" a user's profile picture next to their message.

On mobile screen sizes, the headers stack vertically but stay sticky at the top of the screen.

Resources Used

References

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Cloudinary image

Zoom pan, gen fill, restore, overlay, upscale, crop, resize...

Chain advanced transformations through a set of image and video APIs while optimizing assets by 90%.

Explore

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay