M
M
Martyer2015-01-27 05:13:44
css
Martyer, 2015-01-27 05:13:44

Why doesn't body stretch 100% vertically?

tyts
as you can see the body and html on the floor of the screen, I tried all the ways with the min-height and so on
, the template was originally built incorrectly, now it’s a little streamlined, but the body is still on the half of the screen

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Ivanov, 2015-01-27
@Writerim

html, body {
height: 100%;
padding: 0;
margin: 0;
}

A
Alexander Taratin, 2015-01-27
@Taraflex

Why do you need margin-top:120% for the footer? Do not press it down to the bottom.
I prefer this way myself.

body
{
    display: table;
}

body > div
{
    display: table-row;
height:0;
}

body > .content{
height:100%;
}

S
Sergey Melnikov, 2015-01-27
@mlnkv

jsbin.com/yedima/3/edit?output

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question