Help me to center the button below
Here is my codepen link.
don't know how to center the button
#form {
display: grid;
align-self: flex-start;
margin: 0 7.5rem;
width: 50%;
grid-template-columns: repeat(2, 1fr);
grid-column-gap: 2rem;
grid-row-gap: 1.5rem;
vertical-align: center;
margin-top: 5rem;
}
You can try doing this to center the button.
you need to set the grid-column-start
and grid-column-end
then set justify-self
to center so that the button will be centered.
button {
margin-top: 3rem;
justify-self: center;
grid-column-start: 1;
grid-column-end: 3;
}