Design comparison
Solution retrospective
Hi! I know that graphic is not the best and my result could be not very similar, but I did this challenge in a bunch of minutes because I used Bootstrap. The only thing I'd not resolved is the card-img border radius that doesn't work (maybe because is inside a card??) Feel free to feedback me , thanks :)
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Mirko, congratulations for your first solution! 👋 Welcome to the Frontend Mentor Coding Community!
👏 Great start and great first solution! You’ve done really good work here putting everything together, I’ve some suggestions you can consider applying to your code:
When you download the project files there’s a file called
style-guide.md
where you can find information such ashsl color codes
and thefont-size
for the headings. The background-color in this case isbackground-color: #D5E1EF
1.This is the correct color for the background
body { background-color: hsl(212deg 66% 92%);}
2.The correct value for this shadow is
box-shadow: 5px 5px 15px 5px rgb(0 0 0 / 3%);
3.I saw that you've used
margins
andposition relative
to give the container its alignment, this works but is really tricky to control all the content. My advice for you is to useflexbox
to create this alignment. To make this alignment, first of all putmin-height: 100vh
to thebody
to make the body display 100% of the viewport height (this makes the container align to the height size thats now 100% of the screen height) size anddisplay: flex
eflex-direction: column
to align the child element (the container) vertically using the body as reference.✌️ I hope this helps you and happy coding!
0 - @hyrongennikePosted about 2 years ago
Hi,
Good first attempt at the challenge. Just a few suggestion, to center the card on the page use th following:
body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; }
you can either add it directly or use the equivalent bootstrap class. Remove the background colors on the sections and add the background color on the body and a box shadow.
To get rounded corners on the image remove the p-3 class and add it to the card container.
Hope these are helpful.
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