How can I center vertically a div as a graphic in respect to the viewport?

Hi! If someone please helps me with this I’d be thankful.
The idea is to make an animation whose central body is at the center of the viewport. I’ve tried with 50vh and 50vw, didn’t work so I tried flexbox with align-items: center and justify-content: center. OK, that works horizontally but not vertically even if align-items is supposed to work like that. I’ve tried all that I could imagine but the graphic refuses to go down and get centered.

My pen so far:

Try putting the “bird” in a container with a min-height of 100vh.

1 Like

@CactusWren2020 Thank you, I’ll do that. Of course calling it bird at this stage would be pretentious on my part. Just a working title. Thanks!

1 Like