DEV Community

yogeshwaran
yogeshwaran

Posted on • Originally published at yogeshwaran.in on

2 1

Position:sticky

Hello everyone, Welcome to my first post of 2021.

What is position:sticky ?

Sticky is simply the combination of fixed and relative positions. Sticky Elements remain relative untill it touches the declared threshold level.

.sticky{
  position:sticky;
  //Related Elements become fixed at their top:0
  top:0;
}
Enter fullscreen mode Exit fullscreen mode

Simple example of sticky - Article with sub titles

See the Pen position:sticky by yogeshwaran
(@yoyo) on CodePen.

Can i use sticky in my project ?

All latest browser supports sticky except in HTML table’s th or tr.If you are not considering IE11. you should definetly give a try on this.

See Browser support table here

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs