sticky element css code example
Example 1: css sticky navigatiojn
nav {
position:sticky;
top:0;
}
/*Top can be replaced with bottom, left, or right
depending on what you want :) */
Example 2: make a div sticky
.fixedElement {
background-color: #c0c0c0;
position:fixed;
top:0;
width:100%;
z-index:100;
}