Coding task · HTML and CSS course · Module 3: CSS Basics
Sticky Header on a Page
Position: sticky is a hybrid between relative and fixed. The element sticks to the edge of the screen while scrolling. It's perfect for navigation headers and section titles. It requires a top (or left/right/bottom) value that defines the sticking threshold.
Task
Uncomment the CSS rules so the .temple-header sticks to the top of the page (position: sticky, top: 0, z-index: 100). Also set .room-title as sticky with top: 60px. Add position: relative to .badge-container and position: absolute to .badge.