-4

I want my div-blocks to automatically scale their height to full length of the screen. It should be screen resolution independent. How can I achieve that?

Here is an img of my problem.

Any Idea?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Can you share what you've tried? Is the div's 'height' set to 100%? – pushasha Apr 25 '16 at 18:09
  • Possible duplicate of [For div to extend full height](http://stackoverflow.com/questions/4535983/for-div-to-extend-full-height) – pushasha Apr 25 '16 at 18:11
  • You can post a link to a jsbin, codepen or your actual code here rather than an image – mugabits Apr 25 '16 at 18:11
  • I'm sorry guys, I'm a bloody greenhorn as well in HTML/CSS as on steckoverflow. Thanks for the fast help. – Christian Weingärtner Apr 25 '16 at 18:28
  • Welcome to Stack Overflow! Questions seeking code help must include the shortest code necessary to reproduce it **in the question itself** preferably in a [**Stack Snippet**](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/). See [**How to create a Minimal, Complete, and Verifiable example**](http://stackoverflow.com/help/mcve) – Paulie_D Apr 25 '16 at 18:38

1 Answers1

0

Try this,

CSS:

html, body {
    height: 100%;
}
div {
    height: 100%;
}
Leandro Soriano
  • 669
  • 1
  • 6
  • 14