I have this html and css, where I have a header at the top, that stays at the top and I want to stay at the top
And I Have content below it
I have lots of text in the content.
The problem is that when I scroll the page, the content doesn’t stay below the header.
Years ago i’d have used frames and that problem wouldn’t exist. But I can’t see how to prevent it happening with divs.
<html>
<head>
</head>
<body>
<div id="header" style="position:fixed">
<a href="#"><button>Home</button></a>
<a href="#"><button>Current</button></a>
<a href="#"><button>Future</button></a>
<!-- <a href="services.html"><div class="button">Services</div></a> -->
</div>
<div style="padding: 25px 0%" id="content" >
<h2>About Us</h2>
Pyxis is a small and faint constellation in the southern sky. The name comes from
.....................................
spectroscopy.
</div>
</body>
</html>