Suppose there is a menu:

.top{ position: fixed; width: 100%; height: 200px; background-color: #d32013; } 
 <div class="top"> </div> 

When displayed on the phone - I do not save the proportion of height when tilting. What should I do? I'm testing on the iPhone and iPad

  • If you need dimensions proportional to the width of the screen, use the unit of measurement vw - 100vw is the width of the screen - andreymal
  • No, the size should be fixed. So that when turning the block height does not change - Antonio112009
  • In your code, it is strictly 200 pixels - andreymal
  • @andreymal but on the iPhone it changes the value when tilting ... I'll check the code again - Antonio112009
  • one
    Perhaps you forgot to register meta viewport and your iPhones-ipads scale the page to simulate a width of 980 pixels. Stackoverflow.com/a/733042 - andreymal

0