Design comparison
SolutionDesign
Solution retrospective
Hi everyone,
this my third card component and it's nice to see how with every new chalenge it's easier for me to style everything. And despite the fact, they are "only" card components I learn something new with every chalenge.
I would appreciate it if you could check my code and tell me if there is something I do wrong or unefficient.
Thank you
Klara
Community feedback
- @denieldenPosted about 2 years ago
Hi Klara, congratulations on completing the challenge, great job! 😁
Some little tips for optimizing your code:
- use
article
tag instead ofmain
tag to the container card for improve the Accessibility because main is for wrap the all main page content - to center the eye image in the
:hover
effect addposition: relative
toequilibrium
class and settop: 50%
to.equilibrium-view
class - another approce for the effect
:hover
is creating adiv
that appears on hover. I used tailwind but you can still see and understand which css properties you can use to do the same. Look here -> my solution - Using
<hr>
for the line is not the best way because this tag have a semantic meaning... in this case use div withborder-bottom
because this line is decorative - use
min-height: 100vh
to body instead ofheight
, otherwise the content is cut off when the browser height is less than the content - add
transition
on the element with hover effect - instead of using
px
use relative units of measurement likerem
-> read here
Hope this help! Happy coding 😉
Marked as helpful0 - use
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