JSFiddle - React, Tailwind, and code Playground
by Glynne Turner
HTML
<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<section class="static">
this is the sticky header
</section>
<section class="first">
FIRST SECTION
</section>
<section class="second">
SECOND SECTION
</section>
<section class="footer">
FOOTER HERE
</section>
CSS
.static{
height: 150px;
background-color: pink;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
}
.first{
position: relative;
margin-top: 150px;
background-color: lightgreen;
height: 50vh;
}
.second{
background-color: lightblue;
height: 50vh;
}