How to stretch an empty div to the screen height?

Question isgiven 100 rows, but when faced with a problem googling a clear answer is not found.

Need to bilok was stretched to the full height even if the content is not enough.

Tried the following:

html, body, .content{
height:100%;
}

Not something - because the box is too high, and you receive the scroll. Of course you need a responsive solution that is not fixed.

Thank you.
September 19th 19 at 12:46
4 answers
September 19th 19 at 12:48
Solution
Well. Thank you. My version is also working, I just realized what the problem was - why the scroll appeared. I had specified margin 40px; then the question is how you can do that with margin values were not scrolling? To the value of the height was decreased? - Ed.DuBuque61 commented on September 19th 19 at 12:51
: show where You have scrolling? - mauricio.Wolff54 commented on September 19th 19 at 12:54
storage2.static.itmages.com/i/15/0227/h_1425051031...
#wrapper {
min-height: 100%;
margin: 0 auto;
background-color: white;
margin-top: 100px;
margin-right: 20px;
margin-left: 20px;
margin-bottom: 40px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-khtml-border-radius: 3px;
} - Ed.DuBuque61 commented on September 19th 19 at 12:57
: use jsfiddle and padding - mauricio.Wolff54 commented on September 19th 19 at 13:00
: c padding the same result as with the margin. - Ed.DuBuque61 commented on September 19th 19 at 13:03
: use jsfiddle
Written 26 minutes ago - mauricio.Wolff54 commented on September 19th 19 at 13:06
: I understand that I do not see what you - mauricio.Wolff54 commented on September 19th 19 at 13:09
: jsfiddle.net/nup76m89 please. - Ed.DuBuque61 commented on September 19th 19 at 13:12
: jsfiddle.net/Symphony/nup76m89/1 - mauricio.Wolff54 commented on September 19th 19 at 13:15
whether you did not understand what I need, whether it's not working :) - Ed.DuBuque61 commented on September 19th 19 at 13:18
And why when I added the block header that padding-bottom is not working? - Ed.DuBuque61 commented on September 19th 19 at 13:21
: use jsfiddle
Written 26 minutes ago
Written 53 minutes ago - mauricio.Wolff54 commented on September 19th 19 at 13:24
: jsfiddle.net/stz7Lkug here please. Why padding-bottom isn't working? - Ed.DuBuque61 commented on September 19th 19 at 13:27
: jsfiddle.net/Symphony/stz7Lkug/1 - mauricio.Wolff54 commented on September 19th 19 at 13:30
: Thank you! Helped very. And why in my version the bottom padding not working? I need to know that in future not to make such mistakes. - Ed.DuBuque61 commented on September 19th 19 at 13:33
: we need to wrap the layout in a wrapper: forgive me, some Humanities for taftologiyu - mauricio.Wolff54 commented on September 19th 19 at 13:36
September 19th 19 at 12:50
.content {
height: 100vh; //height of screen
}
September 19th 19 at 12:52
div{
 height: 100%;
}


See that you have the parent element is also 100%.
September 19th 19 at 12:54
also faced with this problem, is very simple, in the css there is a setting "min-block-size:" he rescued me.

Find more questions by tags CSSHTML