(Not to be found anywhere else on the internet to my knowledge, I've been searching for almost two days without success.)
I am facing an issue where a content div with a semi-transparent background and decorative border underneath the site logo does not extend down to meet the top portion of the footer. The footer is fixed to the bottom of the page using position absolute. This problematic area is on the Contact page, which has just a few lines of text and a basic contact form, resulting in insufficient content to fill the entire page.
My specific requirement is for the bordered div to cover the whole page without generating a vertical scroll bar and align seamlessly with the top of the absolutely positioned footer.
The rest of the website manages to push the footer down sufficiently due to ample content. Hence, any CSS properties can be used here, including resorting to a table hack if necessary!
header {
height: 44px;
background: orange;
}
article {
box-sizing: border-box;
border: 1px solid red;
}
footer {
height: 22px;
background: green;
position: absolute;
bottom: 0;
}
<body>
<header>
header
</header>
<article>
article with small amount of content<br>
<br>
and a simple contact form<br>
<br>
this red border needs to meet the top of the footer<br>
without creating a vertical scroll bar
</article>
<footer>
footer
</footer>
</body>