Design comparison
Solution retrospective
Hello, I'm getting back to coding so I start with the easy one! Bye
Community feedback
- @correlucasPosted about 2 years ago
πΎBonjour Ornella T, congratulations for your new solution!
Here's some tips to improve your solution:
First of all use semantic tags for your content, so replace the
div
with<main>
and since the bold title is the main title of this page you should useh1
instead ofh2
. To clean your keep everything inside a single div, no need for additional divs.Something you keep in mind to add for your next solution is to use relative units asrem
orem
instead ofpx
to improve your performance resizing fonts between different screens and devices.π I hope this helps you and happy coding!
Marked as helpful0 - @denieldenPosted about 2 years ago
Hi Ornella, congratulations on completing the challenge, great job! π
Some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - also you can use
article
tag instead of a simplediv
to the container card for improve the Accessibility - use
min-height: 100vh
to body instead ofheight
, otherwise the content is cut off when the browser height is less than the content - in this case
display and object-fit
properties in theimg
element are superfluous
Hope this help! Happy coding π
Marked as helpful0 - add
- @PhoenixDev22Posted about 2 years ago
Hi Ornella T,
Congratulation on completing this frontend mentor challenge. Your solution looks great. I have some suggestions regarding your solution:
- You should use
<main>
for the card. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
- In my opinion, the image is an important content. The alternate text is needed on this image. The alternate text should indicate where the Qr code navigate the user : like
QR code to frontend mentor
not describes the image. The alternate text should not be hyphenated, it should be human readable.
- Page should contain
<h1>
. In this challenge , as itβs supposed to be a part of a whole page, you may use<h1>
with class sr-only aiming at visually hiding the element while keeping it accessible to assistive technologies
- There are a lot the arguments changing the root font size trick ,it state that you should never change the root font size because it harms accessibility.
- Add
min-height: 100vh
instead ofheight: 100vh
to the body that let the body grows taller if the content outgrows the visible page instead.
width: 23rem;
an explicit width is not a good way to have responsive layout . Consider usingmax-width
to the card instead .
Hopefully this feedback helps.
Marked as helpful0 - You should use
- @elaineleungPosted about 2 years ago
Hi Ornella, this looks great, and I'm glad to hear you're getting back to coding (I've been there too)!
You did many things well here, including centering the component and making it responsive. Two small suggestions here:
-
Instead of the
height: 100vh
, change that tomin-height: 100vh
instead so that when the height of the browser is smaller than the contents, the content would not be cut off when you usemin-height
. -
You can add 1rem of margin around
.card
so that the sides won't touch the browser.
That's all, do keep going, you're doing great! π
Marked as helpful0 -
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