Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Last active November 1, 2020 11:40
Show Gist options
  • Save Beyarz/75c68cc7c8a0e7d85ea0a3b86792450d to your computer and use it in GitHub Desktop.
Save Beyarz/75c68cc7c8a0e7d85ea0a3b86792450d to your computer and use it in GitHub Desktop.
A way to put the content exactly in the center both vertical and horizontal
<!DOCTYPE html>
<html>
<head>
<style>
.center {
min-height: 100vh;
align-items: center;
justify-content: center;
display: flex;
}
</style>
</head>
<body>
<p class="center">Always in middle</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment