Good day!
I must say that I used the search and could not find the answer to my variation of the question.
And I will add that I have two parts of the same question, therefore I immediately apologize for many letters and, possibly, difficult to read text.
Preface.
I have a fixed-height header, say 150px (actually 169, and generally changes depending on media queries, but this is not important). Then DIV, which I want to stretch to 100% of the remaining height between the cap and the next layers. And one layer with a fixed height of 100px and a basement with a fixed (sorry for the tautology) height of 60px. That is, the formula is simple:
neccesary_height = window.outerHeight - 310
In fact, here is an example of another author who works perfectly if there is content for the entire height of the container.
Then if you resize the window, then a scrollbar appears and everything works as it should.
Question 1.
And if the content is less than the rest of the window’s height or not at all, then when the window is resized (or initially small) all the blocks below simply run into it and then it disappears completely.
http://jsfiddle.net/qsad/x8s0rytk/
Does anyone have any idea how to solve this? CSS, JavaScript - everything will do.
Question 2.
If inside this DIV position two blocks with:
width:50%; float:left; height:100%;
then they will not inherit the height of the parent and will occupy only that height, which is equal to their content. Specially reduced the height of all the blocks to illustrate the problem.
And I need them to inherit ..
http://jsfiddle.net/qsad/zdm6e0Lk/
Thank you in advance for the answers.