JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://stickyjs.com/jquery.sticky.js"></script>
<p>This is test this is text this is text at the top.</p>
<p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p> <p>This is test this is text this is text at the bottom.</p>
<div id="header">
<p>This is the sticky thingy that is really cool.</p>
</div>
CSS
body {
height: 10000px;
padding: 0;
margin: 0;
}
#header {
background: #bada55;
color: white;
font-family: Droid Sans;
font-size: 18px;
line-height: 1.6em;
font-weight: bold;
text-align: center;
padding: 10px;
text-shadow: 0 1px 1px rgba(0,0,0,.2);
width:100%;
box-sizing:border-box;
}
JavaScript
$(document).ready(function(){
$("#header").sticky({bottomSpacing:50});
});