Design comparison
Solution retrospective
Happy to develop my notions of CSS pseudo-elements and pseudo-classes. I need training to fully master these notions.
What challenges did you encounter, and how did you overcome them?The challenge I'm most proud of is the color change during the hover action. I needed to target only the title during the hover
What specific areas of your project would you like help with?I would love help with the hover effects on my ::after element. The pseudo element passes in front of the card... I tried to fix it with z-index, it just prioritize the content of the card and not its background.
Secondly, I tried to use ::before to insert the avatar image, but then I cannot resize the file with the height of width features. So I just took it off (still in comments in my code)
Community feedback
- @AkoToSiJeromeEhPosted 6 months ago
Hey ! great work out there i just notice that when i try to hover the card the contents are blocking by a background-color : black same height and width of the card ... and i suggest that you can use box shadow instead border to achieve the shadow effect of the card when hovering or not. also i notice that the image is not included there with regards your problem you can use specific width or height and different css units like px or rem and use display : inline-block and vertical : align-middle or you can use display : flex with direction of row and align-items : center . thats all thankyouu... happy coding!!
.card-shadow { box-shadow: 7px 7px hsl(0, 0%, 7%); transition: 0.5s ease-in-out; cursor: pointer; }
.card-shadow:hover { box-shadow: 16px 16px 0 hsl(0, 0%, 7%); }
Marked as helpful0@chokrikadoussiPosted 6 months ago@AkoToSiJeromeEh
Thanks mate !!!! You just improved my code by a 1000%
Most of all, I learned the box-shadow property
Thanks again, happy to code with you
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