Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

blog preview card component

@ozkrTr

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I present to you my solution for this challenge, I hope you like it. I was tempted to use JavaScript because I wanted the card's shadow to change when hovering over the title. However, I later realized that it cannot be done with CSS because you cannot modify a parent element in response to an event from a child element. I am glad to continue enriching my knowledge with each challenge and the support of your comments.

Community feedback

@crsimpson5

Posted

Hey Oscar,

There kinda is a "parent selector" in CSS now. Check out the :has() selector.

Try something like this:

.card:has(.card__title:hover) {
    ...
}

Nice job 👍

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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