Design comparison
Solution retrospective
Any Feedback is appreciated so that I can improve the structures :)
Community feedback
- @correlucasPosted about 2 years ago
👾Hi Marco Louis, congrats on completing this challenge!
The colors you’ve used are a little bit different from the original colors.When you download the project files there’s a file called
style-guide.md
where you can find information such asfont-family
,hsl color codes
, device sizes and thefont-size
for the headings.When you download the project files there’s a file called
style-guide.md
where you can find information such asfont-family
,hsl color codes
, device sizes and thefont-size
for the headings.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 the body to make the child (the card/container) align to its size that now will be displaying 100% of the viewport height and then give its alignment withdisplay: flex
andalign-items: center
/justify-items: center
.body { min-height: 100vh; font-family: var(--ff-primary); font-size: 1rem; background: var(--clr-neutral-4); line-height: 1.25; display: flex; align-items: center; justify-content: center; }
✌️ I hope this helps you and happy coding!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord