4
I need to leave one div
with height: 100%
of content and below it still stand the footer, but, for example, when you have no content to complete the entire screen, the footer appears at the end of the page. He has 100px
and when the content completes the page, the footer is only after the content, after the same scrolling...
I have this problem because I’m using the bootstrap And my navbar is vertical in the right-hand corner. My html tag has the same color as the navbar to complete the color until the end because the menu doesn’t complete everything and the footer has the same color as this sidebar and the html tag.
My div
content has another color, when the page does not complete everything, the footer rises and the color of the footer is extended to a good part of the page, leaving aesthetically ugly. The footer should be at the bottom of the page and the color of the content part should remain until the footer appears.
Does anyone have a solution to this?
You can post the code on jsfiddle ?
– fotanus
There are several solutions to the problem you present, but to find out which one is appropriate for your case it will be necessary to know how you have the structure of the page. As already mentioned, you can create a Jsfiddle with the HTML required to replicate the problem or put the same in your question.
– Zuul
@Caiogomes by chance your page has size equal to the size of the current window height? Could you tell if some fixed size is applied to your page?
– Paulo Roberto Rosa
Nothing against also use Jsfiddle, but remember to put the relevant code in the question.
– Gabe
possible duplicate of How to make the container reach the footer? (even with little content)
– Emerson Rocha
Possible duplicate of http://answall.com/questions/5189/comort-container-alcancar-o-rodape-rodape-com-pouco-conteudo/5193 . They are not exactly the same question, but they are the same answer. The other question is only more elaborate than this
– Emerson Rocha
Remember to choose the best answer. You ask a lot of questions and those who answer like to get feedback as well. Hug.
– thiagobarradas