how to put an element in the middle of a div code example
Example 1: center a div in css
.container {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: how to get my div to centre
.div{margin: 0 auto;}
.container {
display: flex;
justify-content: center;
align-items: center;
}
.div{margin: 0 auto;}