position: sticky with a top offset.
- Category: CSS Questions — part of the CSS Tutorial on GoCareerGo
- Read the short summary above, then check the linked docs for full syntax/behaviour
- Interview tip: be ready to explain "How to Make a Sticky Header?" in one sentence, then back it up with a tiny example
/* How to Make a Sticky Header? */
.example {
/* see the property reference on MDN for full syntax */
}Tip
Quick recall: "How to Make a Sticky Header?" — position: sticky with a top offset.