GitHub 6956★

Have you seen CSS Scan?

The fastest and easiest way to check, copy and edit CSS.

Learn more →

CSS Scan logo

Sticky header

HTML

<div>
<header class="sticky-header__header">...</header>
<main>...</main>
</div>

CSS

.sticky-header__header {
/* Stick to the top */
position: sticky;
top: 0;
}
Demo
Follow me on and to get more useful contents.