I have tried a lot of different types of clearfixes but none are working. I am trying to make a full-width video header that has text infront of it, but you can scroll down past it as well. This is what I have:
HTML:
<div>
<div style="width: 100%; position: relative;" class="video-container clearfix">
<video autoplay loop style="width: 100%; position: absolute; top: 0px; left: 0px;">
<source src="http://demosthenes.info/assets/videos/polina.webm" type="video/webm">
<source src="http://demosthenes.info/assets/videos/polina.mp4" type="video/mp4">
</video>
<div class="col-md-12" style="text-align: center;">
<h1>HI</h1>
<h1>HI</h1>
<h1>HI</h1>
</div>
</div>
<div>
<h3>TEST</h3>
<h3>TEST</h3>
<h3>TEST</h3>
</div>
</div>
CSS:
.clearfix:after {
content: " ";
display: table;
clear: both;
}
I want the HI
's to appear in front of the video (which works) but I want the TEST
's to appear below the video but right now they do not because the video-container
is a lot shorter than the video height.
Why is my clearfix not working?