Hassia Issah• 50,670
@Hassiai
Posted
To center .card on the page using flexbox or grid instead of margin:
- USING FLEXBOX: add min-height:100vh; display: flex; align-items: center: justify-content: center; to the body
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
- USING GRID: add min-height:100vh; display: grid place-items: center to the body
body{
min-height: 100vh;
display: grid;
place-items: center;
}
For a responsive content give .card a fixe max-width value instead of a width. max-width:25rem
.
Add the body a background-size of contain.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful
0