Design comparison
Solution retrospective
Hey there, this is my #3 challenge! Thank you for reviewing my code. Does anyone know how to fix the problem about border-radius alignment? For example, here the border radius of the card and the border radius of the qr-code image are not the same. Any smart solutions?
Community feedback
- @denieldenPosted about 2 years ago
Hello Kelly, You have done a good work! 😁
Some little tips to improve your code:
- use
main
tag to wrap the card and improve the Accessibility but not as a container of that one element - 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 - instead of using
px
use relative units of measurement likerem
-> read here
Keep learning how to code with your amazing solutions to challenges.
Hope this help 😉 and Happy coding!
Marked as helpful0@KellyCHI22Posted about 2 years agoHi @denielden, thanks for your suggestions!
You are right, in real websites the
main
part shouldn't contain only one single card! I've seperated themain
tag and thearticle
tag (which is for the card component).As for the
px
units, yes there are still some in my CSS, I've changed them torem
s orem
s. It really takes some time to get used to total relative units!Thanks again for your suggestions, they are truely helpful :)
1 - use
- @VCaramesPosted about 2 years ago
Hey @Hsin-tingCHI, some suggestions to improve you code:
-
the
height
from the Body Element needs to bemin-height
. -
The Alt Tag description for the QR image needs to be improved upon. Its needs to tell screenreader users what it is and where it will take them to when they scan it.
-
Change the
width
from .card__img tomax-width: 100%
to make it responsive. -
Change
width
from **.card ** to `max-width to make the card responsive. -
Delete all this from **.card ** its unnecessary and just bloating your code :
.card { display: flex; flex-direction: column; justify-content: center; align-items: center; }
Happy Coding!
Marked as helpful0@KellyCHI22Posted about 2 years agoHi @vcarames, thanks for your suggestions!
Its sure that I didn't notice those display properties on
.card
are not doing anything. I've deleted all of them, thank you!As for other suggestions, I've also updated all of them :) I really need to work harder on practicing resposiveness.
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