Design comparison
Solution retrospective
I’m most proud of launching my first-ever live website. It’s exciting to step away from learning and test my abilities in real-time.
I’m still learning, so I know I’ll make mistakes, but I’m eager to learn from each one.
What challenges did you encounter, and how did you overcome them?CSS was my greatest challenge. There are a lot of best practices, do's and don'ts that I didn’t fully adhere to. Additionally, I found myself re-inventing the wheel a lot while styling certain elements. Thankfully, research and AI came to the rescue.
What specific areas of your project would you like help with?CSS, definitely! There are a lot of nuances and styling techniques that are still new to me. I'm eager to learn them all and would appreciate any guidance in these areas.
Community feedback
- @Islandstone89Posted 3 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 a page's "main" section. Change.wrapper
into a<main>
, and move the<footer>
outside of the main. -
Remove the
.clearfix
div, it is not needed. -
I wouldn't use
<figure>
for the image - that is used when we want to include a caption underneath the image. Here is some more info about the<figure>
element. -
The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."
-
Headings should always be in order, so you never start with a
<h3>
. I would change it to a<h2>
- a page should only have one<h1>
, reserved for the main heading. As this is a card heading, it would likely not be the main heading on a page with several components.
CSS:
-
Including a CSS Reset at the top is good practice.
-
I like to add
1rem
ofpadding
on thebody
, to ensure the card doesn't touch the edges on small screens. -
Remove the styles on
.wrapper
, it doesn't need any styles. -
On the
body
, changeheight
tomin-height
- this way, the content will not get cut off if it grows beneath the viewport. Removeoverflow
,width
,max-width
andmargin
, none of those are needed. Addflex-direction: column
andgap: 2rem
. -
On the card, you need to add
display: flex
forflex-direction
andalign-items
to work. -
Remove all widths and heights in
px
. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
font-size
must never be in px. This is a big accessibility issue, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead. -
letter-spacing
must also never be inpx
. You can useem
, where1em
equals the element's font size. -
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. -
Paragraphs have a default value of
font-weight: 400
, so there is no need to declare it. -
On the image, add
display: block
andmax-width: 100%
- the max-width prevents it from overflowing its container. Remove themargin
, except formargin-bottom
. -
To create the space between the image and the edge of the card, set
padding
on all 4 sides of the card::padding: 16px;
. -
As the design doesn't change, there is no need for any media queries. When you do need them, they should be in
rem
orem
, not px.
Marked as helpful0@lola-iloriPosted 2 months ago@Islandstone89 Thank you so much for the detailed feedback. Very much appreciated. I'll adjust my code accordingly.
1 -
- @Zein-MBPosted 3 months ago
Hello there👋
Congratulations on finishing this challenge
I have a little note, try adding some box shadow to make it fit with the design, that's all.
Otherwise your solution is perfect.
Have a nice day✨
Marked as helpful0@lola-iloriPosted 2 months ago@Zein-MB . Thank you! and I appreciate the feedback. I'll use the box-shadow style as advised.
0 - @Guitar8634Posted 3 months ago
Nice job matching the solution to the design. The code is clearly readable. Perhaps consider using an
<h1>
instead of<h3>
for semantics? Does having an<h3>
imply that there is an<h2>
and<h1>
before it? I could be wrong about this.As a next step, consider making use of variables in the CSS for the colors listed.
well done!
0@lola-iloriPosted 2 months ago@Guitar8634 Thanks for the feedback! I'll update my code accordingly and use the correct heading semantics.
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