Design comparison
Solution retrospective
This is not the proud moment for me because I know I've to create more complex ones.
What challenges did you encounter, and how did you overcome them?Only one challenge I faced in this, fitting my image in card.
What specific areas of your project would you like help with?Check my code is perfect & clean or not according to the outcome.
Community feedback
- @Islandstone89Posted 8 months ago
Hi Ayush, you did a good job!
Here is some feedback I hope you find helpful :)
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. Change.container
to a<main>
. -
The alt text must also say where it leads(frontendmentor.io).
CSS:
-
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 all properties on
.container
. -
Remove the margin on the card.
-
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. -
On the image, add
display: block
and changewidth
tomax-width: 100%
- the max-width prevents it from overflowing its container.
0@ayushyadavzPosted 8 months ago@Islandstone89 I have updated the Code according to your approach. Can you please check it now and tell me if i did it correctly or not?
1@Islandstone89Posted 8 months ago@AayushYadavz well done. There are only a few small adjustments left:
- Remove the
<div>
between<main>
and.card
. Your structure should look like this:
<main> <div class="card"> <img> <div class="text"> <h2> <p> </div> </div> </main>
-
Change alt text to "QR code leading to the frontend mentor website".
-
The default value for
font-size
is1rem
, so you don't need to declare that explicitly.
Keep up the good work :)
0@ayushyadavzPosted 8 months ago@Islandstone89 I have submitted 2 more solution of some challenges can you please review them and tell if there is need to change something because I love your review.
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