Answer the question
In order to leave comments, you need to log in
How to pinch variable height footer?
Guys help)
You need to press the footer to the bottom of the browser window.
The height of the footer is unknown.
Found a solution with table emulation:
html,
body {
height: 100%;
}
.wrapper {
display: table;
height: 100%;
}
.content {
display: table-row;
height: 100%;
}
Can I use this, or is there another solution without JS?
---------------------------
IE8+
Without Javascript
Answer the question
In order to leave comments, you need to log in
Not with CSS. Most likely only through JS.
The method described in the article by Anton Zapevalov did not quite justify itself when the screen was reduced.
Yes, https://yadi.sk/i/7Z7q6MmgkFvfk deliberately reduced it less than allowed, but I think that the basement is the same as in the example, this is more an exception to the rule than a classic basement. Usually there is more information there.
This applies specifically to the variable height footer. If the height is fixed, then it will cost the norms.
And your example with tables is somehow scary. This is done on blocks, even more correctly.
In principle, the same thing, but without tables it works quite well.
html, body {
height: 100%;
}
.wrapper {
height: 100%;
}
.content {
height: 100%;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question