center align body css code example
Example 1: center a div in css
.container {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: html center body
body {
display:flex; flex-direction:column; justify-content:center;
min-height:100vh;
}
Example 3: html center body
body {
max-width: max-content;
margin: auto;
}