@DavidMorgade
Posted
Hello Harderth, congrats on finishing the challenge!
If you want to center your div
vertically and horizontally at the same time, instead of using margins on your div
, try using flex-box in the parent element (the body), to archive this you have to set the min-height
of your body to 100vh
, with this it will take the full space of the screen, meaning that you can center the elements inside it with flexbox like this:
body {
font-family: 'Karla', sans-serif;
font-size: 16px;
background-color: hsl(204, 43%, 93%);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-height: 100vh;
}
I encourage you to try it in your solution and see if it works!
Hope my feedback helps you, if you have any questions don't hesitate to ask, goog job!
Marked as helpful