It was originally on a website I was working on, but this problem keeps happening. Basically, I would think .box1 would be at the bottom, having position: absolute, and bottom:0 as its style. But for some unknown reason, It moves to the top and appears to be at the header's bottom. Not the viewport's.
Codepen link as follows codepen link
And here are html and css for convenience.
.masthead {
height: 100vh;
min-height: 500px;
background-color: white;
border: 3px solid black;
}
.box1 {
background-color: blue;
width: 200px;
height: 200px;
position: absolute;
bottom: 0;
}
<header class="masthead">
<h1>This is an example.</h1>
</header>
<div class="box1">
</div>
<div>
<p>
Ask to be pet then attack owners hand cat not kitten around groom yourself 4 hours - checked, have your beauty sleep 18 hours - checked, be fabulous for the rest of the day
</p>
<p>
n walls it smells like breakfast yet stand with legs in the litter box, but poop outside so scratch at door to be let outside, get let out then scratch at the door immediately after to be let back in swat at dog. Lie in the sink all day somehow manage
to catch a bird but have no idea what to do next, so play with it until it dies of shock cough furball into the food bowl then scratch owner for a new one curl into a furry donut yet fart in owners foo
</p>
</div>