Ich möchte, dass der Inhalt vertikal und horizontal zentriert wird, aber er wird nur horizontal zentriert. Das Problem ist, dass ich keine feste Höhe habe. Danke Leute für Hilfe!Zentriere ein DIV horizontal und vertikal ohne feste Höhe
html,
body {
height: 100% margin: 0;
overflow: hidden;
}
.content {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
display: flex;
flex-direction: column;
text-align: center;
}
<div class="content">
<h1>Welcome to the website!</h1>
</div>
wo ist Ihre HTML –
Sind Sie positiv, dass die Antwort nicht in diesem Thread gefunden werden http://stackoverflow.com/questions/396145/how-to-vertically-center-a-div-for- All-Browser? – Turnip
Danke, fand die Lösung! – Daniel