I've figured out that the floating elements are what is causing the problem.
Here is my code
#header {
position: sticky;
}
#main {
width: 100%;
}
#content {
width: 50%;
float: left;
height: 800px;
box-sizing: border-box;
border: solid red;
}
<body>
<h1 id="header">Header</h1>
<div id="main">
<p id="content">words</p>
<p id="content">words</p>
</div>
</body>
On my site, I am using the RWD column design by W3 if that is relevant. It just formats the width and floats anything with the specific class.