0

for developing, I'm using the chrome engine. On the web version everything is fine, but on a real device with chrome is it different. It happens with other browsers like Firefox too.

Here is a picture about the behavior: https://gyazo.com/1d0cab6f0467c72e3cd4d64dceccf3a2

The left side is the view from my desktop and the right side from my device.

body {
  margin: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}
main {
  overflow: auto;
  height: calc(100% - 112px);
  background: red;
}
.navigation {
  height: 56px;
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  background-color: #fff;
  z-index: 6;
}

Does someone know why this happens?

Thanks in advance!

2 Answers2

0

This could be because of the px values. Instead try using % or rem.

0

The problem come from the vh.
On the mobile version is the vh different. I fixed it with calculating the vh with JavaScript. Here are more information: CSS3 100vh not constant in mobile browser