@ricardoychino
Posted
Hi, great job with the solution.
I just wanted to leave some tips:
- Instead of fixing the
height
ofbody
to 100vh, is better to set themin-height
to 100vh. This makes the layout more dynamic and kind of ready for future changes - You can use
line-height
with1.4
instead of140%
, for example. Not exactly a best-practice, but is more common this way and it is a bit cleaner - Inside a flexbox, margins "pushes" spaces as possible, so to center
.card-container
insidebody
, you could:
body {
display: flex;
}
.card-container {
margin: auto; /* This pushes spaces in all four directions and centers the element inside the parent */
}
- This is something I personally think is a better practice, but nothing wrong if you don't want to: using
box-sizing: border-box
in whole stylesheet
Marked as helpful
@JonDoesFrontEnd
Posted
@ricardoychino Thanks a lot for the tips! I did not know about the auto keyword - that's definitely going to come in handy.