I am confused about the my-auto

I am confused about the my-auto
0

#1

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!


#2

@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:

https://www.w3schools.com/cssref/pr_margin-top.asp