Greetings.

How to make so that from any device the initial background was under the height of the device screen as in the example ?

Closed due to the fact that it is necessary to reformulate the question so that you can give an objectively correct answer to the participants iluxa1810 , HamSter , Denis , αλεχολυτ , Grundy 11 Nov '16 at 15:15 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

    2 answers 2

    I will add the answer user190134 .
    If the block is not in the root of the body, then specify the height: 100vh;

    • I used to work with vh and even now I work, but I never set 100. Now I tried. Everything is working. Thank! - gmastrbit

    It is necessary to give a height of 100%. But remember that the percentage height is taken from the height of the parent. So you need to give height html, body is also 100%

    • Hmm .. If position: relative then the height property will not work. It depends on the content. Then you need to use absolute positioning? - gmastrbit