<body>
<div>Hello World</div>
</body>
div {
position: absolute;
top: 50%;
left: 50%;
transform: transform(-50%, -50%);
}
body {
display: grid;
place-items: center;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
body {
display: flex;
align-items: center;
}
div {
/*margin: 0 auto;*/
margin-inline: auto;
}
body {
display: table;
width: 100%;
height: 100%;
}
div {
display: table-cell;
text-align: center;
vertical-align: middle;
}
div {
text-align: center;
width: 100%;
height: 100%;
font-size: 1.5rem;
line-height: 100vh;
}
body {
/*display: flex;*/
display: grid;
}
div {
margin: auto;
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.