@saniyasaher20
Posted
body{ display: flex; align-items: center; height: 100vh; }
Add these three lines to your body tag to vertically align the .container
Explanation: In your code, body is parent tag of the card( .container ) and card is child. To align the child you can add 'display: flex;' to your parent tag and then use other flex properties to align the child either vertically or horizontally. the next line align-items: center; will align the child means card to center. But make sure you parent have space to give to the child that's why third line comes handy. Add height: 100vh; to body.
Marked as helpful
@elvladi15
Posted
@saniyasaher20 oh, thank you very much for the feedback!