@osaaroh
Posted
Hello Bolu,
Good work in completing the challenge. Yes CSS flexbox will help with a more responsive outcome instead of using margins to center element.
- To center your card, I recommend you remove all the margins (top and left) you put on your "container" div. Instead add the following attributes to your "body" element:
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
The first three is to center all child elements horizontally and the last one takes all the size of the height of the device that sees it and centers the content vertically.
- You can use "text-align:center" on your ".top" element to center all text
Hope this helps.
Marked as helpful
@Master-Osaro Very helpful tip master-Osaro. Thank you. Look forward to learning more from you!
@Master-Osaro Very helpful tip master-Osaro. Thank you. Look forward to learning more from you!
@Master-Osaro Very helpful tip master-Osaro. Thank you. Look forward to learning more from you!