css how to center text in box code example
Example 1: center a div in css
.container {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: center text in css
.class {
text-align: center;
}
.container {
display: flex;
justify-content: center;
align-items: center;
}
.class {
text-align: center;
}