Skip to content

Instantly share code, notes, and snippets.

@ramondeklein
Created June 4, 2018 11:06
Show Gist options
  • Save ramondeklein/4d194384105a64a9ff5c139c980e23ef to your computer and use it in GitHub Desktop.
Save ramondeklein/4d194384105a64a9ff5c139c980e23ef to your computer and use it in GitHub Desktop.
Layout issue for Chrome 67 (Android)
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
html, body {
height: 100%;
overflow: hidden;
}
.wrapper {
height: 100%;
width: 100%;
align-items: center;
display: grid;
grid-auto-rows: 1fr;
justify-content: center;
}
.wrapper img {
max-height: 100%;
max-width: 100%;
}
</style>
</head>
<body>
<div class="wrapper">
<img src="https://testimages.org/img/testimages_screenshot.jpg" alt="" />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment