My footer has a defined height ( height: 40px;
).
When the content of the page itself is small, the area remaining after it is completely blank, because of the background, giving a bad aesthetic to the site.
I wanted the footer after the footer to fill up the rest of the page and not go blank.
However, when I putheight: 100%
into <footer>
it goes beyond the end of the page creating an unwanted scroll. That is, it increases the overall size of the page itself.
The only solution I see is to set background-color: mesmacordofooter;
to body
. But I'm finding this to be a bad programming practice.
footer {
width: 100%;
background: rgb(45,45,47);
color: #B8BBC1;
display: flex;
justify-content: center;
font-size: 20px;
}
#footercontainer {
width: 1000px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 40px;
}
<footer>
<div id="footercontainer">
</div>
</footer>