How to make the whole page and all its content automatically fit to the window size, i.e. so that there are no scrolls. proportions do not need to be saved The page can stretch like rubber ..

Closed due to the fact that the issue is too general for the participants MihailPw , sanmai , HamSter , αλεχολυτ , Cheg 2 Aug '17 at 7:47 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • And what language? And where is the page? Web? Desktop application? Mobile app? - Mikhail Vaysman
  • This is a php web site - Alex Ander
  • This is called adaptive layout - look for information about this - Mikhail Vaysman
  • Why write in capital letters. We see perfectly. - nick_n_a
  • I searched, but unfortunately did not find the necessary info. it basically talks about how to adapt the site for various devices, but I’m interested in the site stretching along the window frames like rubber - Alex Ander

1 answer 1

Use for measuring the main blocks of the page units vw (means viewport width ) for horizontal measurements and vh (means viewport height ) for vertical measurements, where

  • 1vw means 1% of the screen width
  • 1vh means 1% of the screen height.
  • and how to write these parameters? in styles? - Alex Ander
  • @AlexAnder Yes, for example, width: 50vw , font-size: calc(1vh + 10px) , margin-left: 0.05vw , etc. - Vadim Ovchinnikov
  • that 's what they recommended to me. everything worked, but only in Chrome. but doesn’t react to altitude in IE - Alex Ander
  • Well, I see that in IE works. The height decreases with decreasing screen height. - Vadim Ovchinnikov