@ecemgo
Posted
Some recommendations regarding your code that could be of interest to you.
CSS
- If you want to center it easily, you can update your
body
in this way:
body {
background-color: hsl(212, 45%, 89%);
font-family: "Outfit", sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
}
- if you use flexbox, you don't need to give margin to
whitebox
. Thiswhitebox
is the updated version:
.whitebox{
position: relative;
height: 580px;
max-width: 350px; // max-width makes it responsive
background-color: hsl(0, 0%, 100%);
border-radius: 5%;
}
Hope I am helpful. :)
Marked as helpful
@Anselvi
Posted
Thanks very much @ecemgo , just edited as you suggested and works great, also read on MDN about Flex and learned a new CSS property.
Thanks very much!!!
@ecemgo
Posted
@Anselvi Learning never ends in frontend development, we learn something new almost every day😉 I'm glad that I made this possible🤗