css how to align elements horizontally code example
Example 1: css align items vertical center
.parent {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: how to align elements horizontally in css
.row {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
}
.block {
width: 100px;
}