JSFiddle - React, Tailwind, and code Playground

HTML

<div id="fixed-panel-top">
		<!-- Navbar -->
		<div class="custom-navbar-example"></div>
	
		<!-- Top fixed content area -->
		<div class="fixed-content-top">
		</div>                         
	
	</div>

    <div class="container relative-content">
    </div>

CSS

#fixed-panel-top {
			position: fixed;
			top: 0;
			right: 0;
			left: 0;
			width: 800px;
			margin-left: auto;
			margin-right: auto;
		}
		
		.custom-navbar-example {
			height: 40px;
			background-color: yellow;
			z-index: 1030;
            position: relative;
		}
		
		.fixed-content-top {
			height: 200px;
			background-color: blue;
			z-index: 1;
		}
		
		.relative-content {
			width: 800px;
			margin-top: 300px;
			height:1000px;
			background-color: red;
			z-index: 10;
            position: relative;
		}