pokilo.com
@programing
0Friends 0Fans
Karma0.0
Israel
pokilo.com
1 years ago
to center a div, you can use CSS flexbox, CSS grid, or apply auto margins to the left and right. Here are brief examples:
Flexbox:

.parent {
display: flex;
justify-content: center;
align-items: center;
}
Grid:

.parent {
display: grid;
place-items: center; } Auto margins: .center-div { margin-left: auto; margin-right: auto; }