@correlucas
Posted
👾Hi Abdallah , congrats on completing this challenge!
I've just opened your live site and I can say that you did a great job putting everything together! There's some tips to improve your solution:
The approach you've used to center this card vertically is not the best way, because using margins you don't have much control over the component when it scales. My suggestion is that you do this alignment with flexbox
using the body as a reference for the container.
The first thing you need to do is to remove the margins used to align it, then apply min-height: 100vh
to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body with display: flex
and align-items: center
/ justify-items: center
.
REMOVE MARGINS
@media (min-width: 700px) and (max-width: 5000px)
div.contener {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
display: grid;
/* margin: 20% 20%; */
}
ADD MIN-HEIGHT: 100VH
@media (min-width: 700px) and (max-width: 5000px)
body {
min-height: 100vh;
/* width: 100%; */
/* height: 100%; */
background-color: hsl(30, 38%, 92%);
display: flex;
justify-content: center;
display: flex;
align-items: center;
}
✌️ I hope this helps you and happy coding!
Marked as helpful