@djbedford
Posted
Hey, yes you are correct in your thinking. The reason you need to set the height is because height is determined by the content, so when you try and center it vertically there is no room to adjust as it is already taking up it's full height. Now when you set the height to 100vh or something equivalent it has more room in order to palce the content centrally.
You can check out this article on MDN for a better explanation of how to align items https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container or I find CSS-TRICKS a good reference, here is their explanation for the align-items property https://css-tricks.com/almanac/properties/a/align-items/
Hope this helps.