Positioning Demo

position: sticky

This box stays on top of the page and scrolls in the viewport when the upper edge is reached through scrolling.

position: static

Box 1
Box 1.1
Box 1.2 (display: inline-block)
Box 1.3 (display: inline-block)
Box 1.4 (display: inline-block)
Box 2
Box 2.1
Box 2.2

position: relative

Box 1
Box 2
Box 3

position: absolute

Box 1
Box 2
Box 3

position: fixed

Box 1
Box 2 (Fixed)
Box 3






























End of Demo