Design comparison
Solution retrospective
I am pround that the finish result is very close to the original, but i am learning about the css units .
What challenges did you encounter, and how did you overcome them?I did'nt knew about the vw and vh nd after i submit the project i discovered about them and then i fixed it.
What specific areas of your project would you like help with?I like link about css.
Community feedback
- @Ezekiel225Posted 10 months ago
Hello there 👋 @MellTins.
Good job on completing the challenge !
Your project looks really good!
I have a suggestion about your code that might interest you.
There is an very useful browser extension called Perfect Pixel that allow you compare with the design image and thus see the exact dimensions. I recommend it to you.
Consider adding a min-height of 100vh to the body element so as to centralize your project.
body { min-height: 100vh; align-items: center; display: flex; justify-content: center; }
I hope this suggestion is useful for future projects.
Other than that, great job!
Happy coding.
Marked as helpful1@MellTinsPosted 10 months agoI really apreciate your guidance, i will definitely working on it.@Ezekiel225
0 - @Islandstone89Posted 10 months ago
HTML:
-
Every webpage needs a
<main>
that wraps all of the content, except for<header>
andfooter>
. This is vital for accessibility, as it helps screen readers identify the "main" section of a page. Replace<section>
with<main>
. -
The alt text must also say where it leads(frontendmentor.io).
-
.attribution
should be a<footer>
, and its text must be wrapped in a<p>
.
CSS:
-
Performance-wise, it's better to link fonts in the
<head>
of the HTML than using@import
. -
It's good practice to include a CSS Reset at the top.
-
Add around
1rem
ofpadding
on thebody
, so the card doesn't touch the edges on small screens. -
Remove the margin on the card.
-
To center the card horizontally and vertically, use Flexbox on the body:
display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100svh;
-
Remove the widths in
px
. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
Since all of the text should be centered, you only need to set
text-align: center
on the body, and remove it elsewhere. The children will inherit the value. -
On the image, add
display: block
andmax-width: 100%
- the max-width prevents it from overflowing its container.
Marked as helpful0@MellTinsPosted 10 months ago@Islandstone89 Thank you so much for take your time and explain those things for me, i am soaking up all the informations.
1 -
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