I am trying to have a page that scrolls horizontally and not vertically. The code below works on desktop browsers, but when viewing the page in a mobile browser I get a problem. I can still scroll horizontally, but the height is not restricted to 100vh and a large amount of empty space is populated below the wrapper.
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="wrapper">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</body>
</html>
.html, body {
max-height:100vh;}
.wrapper{
width:2300px;
display:flex;
background-color:red;
height:100vh;
max-height:100vh;
overflow:scroll;
-webkit-overflow-scrolling:touch}
.box{
position:relative;
align-self: center;
margin-left:50px;
float:left;
width:400px;
height:400px;
background-color:white;}