here is my Codepen link:
I want to put the div #quote-div at the center of the page, so I set “mx-auto my-auto”
but the result is the picture:
the div is at the top of the page, why “my-auto” is invalid?
Please give me some help!Thanks a lot!
here is my Codepen link:
I want to put the div #quote-div at the center of the page, so I set “mx-auto my-auto”
but the result is the picture:
the div is at the top of the page, why “my-auto” is invalid?
Please give me some help!Thanks a lot!
@Sarah,
you want to add a margin to the top of your div. Inside your CSS selector for the quote-div, put :
#quote-div{
background-color: white;
margin-top : 20%;
border-radius:5px;
}
Read more about it here: