Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ingozoell/8614a1c505fbe88edb73684411625d07 to your computer and use it in GitHub Desktop.
Save ingozoell/8614a1c505fbe88edb73684411625d07 to your computer and use it in GitHub Desktop.
Vertikal und horizontal zentrieren (responsive) https://jsfiddle.net/taqLrzkx/11/
html {
display: table;
height: 100%;
width: 100%;
text-align: center;
}
body {
display: table-cell;
vertical-align: middle;
}
.outer {
text-align: left;
margin: auto;
max-width: 400px;
}
<div class="outer">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment