It must be done so that if a diva has something like top: 50% or margin-top:60vh , then if there are elements below, it does not overlap with them, but just above them

PS The question is very interesting and I ask for a detailed, competent answer. After 2 days I will send to the award and whose answer will be the best, I will note

To less js and more css, plus a fallback for ancient browsers such as ie7

  • If the div has a default position: static; , the margin-top: 60vh will not force to overlap the elements below. - Vadim Ovchinnikov
  • What would not be superimposed on each other when offset obviously need to shift everything together. - Sergey
  • @Sergey is obvious, the question is how to do it. - Vadim Ovchinnikov
  • There, 50% added and there add. Or place everything in a common div container and move it alone. And with standard positioning everything moves by itself. Depends on your html. - Sergey
  • @sergey And if I have a total height: 100% max-height: 100% and I need a logitip in the middle, and below an element that is stuck to the bottom, and it’s necessary that the logo doesn’t run into it - Herrgott

0