1

I'm building a mobile site that needs to be used equally on all mobile screens.

All dimensions in the layout are obtained for a screen of 1080 for 1920, while only the width is scaled normally on a mobile device, scrolling appears in height. How can I scale the site in height as well, avoiding using % everywhere in css?

Example: enter image description here

For width, viewport width=device-width is used, but for height, property height=device-height doesn't work

ToDoThis
  • 45
  • 6

1 Answers1

0

You can try experimenting with vh css unit.

Also see: https://www.w3schools.com/cssref/css_units.asp

  • This doesn't work for me. If I set the height to 100vh there is not enough space in my layout for components and I need to set all sizes in css to vh – ToDoThis Jan 31 '22 at 07:55