Skip to content
All Challenges
#42

Sticky Header

Medium
Category: Positioning

Make .site-header stick to the top of the viewport when scrolling using position: sticky and top: 0.

Target HTML in preview:
<header class="site-header">Sticky Nav</header><main style="height: 1000px;"></main>
Verification Criteria:
Set position: sticky
Set top: 0
styles.css
Live Evaluation
Loading...
|
Live Browser Output
Sandboxed Preview