1
My footer has a set height(height: 40px;
).
When the content of the page itself is small, the remaining area after it is all blank, because of the background, giving a bad aesthetic to the site.
I wish that after the footer, it fills up the rest of the page and it doesn’t turn white.
However when I put height: 100%
in <footer>
it goes beyond the bottom of the page by creating an unwanted scroll. That is, it increases the total size of the page itself.
The only solution I see is to put background-color: mesmacordofooter;
in the body
. But I’m thinking this is 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>
Put the
HTML
also.– Edilson
@Edilson the main part of HTML regarding doubt is already in the post. I cannot send all the HTML because it is too much code and it is impossible to put here. I think what I have already posted is enough to understand the problem. In case you need anything, just ask.
– Amzero
I mean, that Coles just a sketch, for example the
tags
that make up this flex, so that we can see if thefooter
is below or above whom.– Edilson