Design comparison
Solution retrospective
I would appreciate any and all comments and suggestions in regard to my HTML code and CSS code. I did find applying the hover states challenging but with the help of online research I was able to complete this challenge. Thanks
Community feedback
- @correlucasPosted over 2 years ago
Hello Kim, congratulations for your new challenge solution!
You've done a great work applying the hover effect! I've some tips for you!
- Consider applying the attribution tag out of the card container, you'll have a cleaner layout if you do it.
2.You can get rid of the
<header>
tag an keep only the<h1>
in this context is an unnecessary element.3.Card Icon Overlay: the overlay is a little bit not aligned in the right, its a matter of 2 pixels. You can try the follwing values to have it centered:
display: flex; position: absolute; border-radius: 7px; align-items: center; justify-content: center; flex-direction: column; top: 0; left: 0; width: 100%; height: 100%; background-image: url(./images/icon-view.svg) no-repeat center; background-color: hsl(178, 100%, 50%, 0.5); opacity: 0;
4.Hover animation: in the hover animation you can give a final touch adding animation properties like "ease / ease-in / ease-out" to have a non linear transition, try it in the image overlay for example to the result.
transition: ease-in .5s;
I hope it helps you, keep coding!
Marked as helpful0 - @vanzasetiaPosted over 2 years ago
Hello, Kim! 👋
Good effort on this challenge! 👍
I have some feedback on this solution.
width
andheight
attributes on theimg
element are used to optimize CLS (Cumulative Layout Shift) (giving placeholder before the image is fully loaded or simply prevent jumping layout). The value for those attributes should be unitless.- There should not be text in
span
anddiv
alone whenever possible. Instead, wrap the text with a meaningful element like a paragraph element. - The site is currently missing the interactive elements. So, I recommend wrapping all the elements that have interactivity with interactive elements such as anchor tag.
I hope this helps. 😊
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