Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Blog preview card html/css solution

hyperavtr•150
@hyperavtr
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

By getting knowledge that :hover pseudo-element can't apply any changes to parent of the selected element .

What specific areas of your project would you like help with?

1.I've tried to make change my #blog-preview-card's(parent element, container) shadow-box value by hovering the #header(child element) .This turned out to work only in opposite way, e.g. this way:

.parent:hover .child { background-color: white; }. (When you hover over the parent element, it will change the background color of the child element to white)

I've seen some variants for solution of my problem with pseudo-element :has and assigning position: relative to parent and position: absolute to child element but it didn't worked at my case. If It's possible and can work with my code please write your options. I struggled a lot with this and it's a bit annoying to leave it how it is, but if it's realm of JavaScript usage, okay, so be it.

2.W3C validator, seems, not to be complaining about my code, but if you look and it's semantic will seem to you wrong/unnecessary/unreasonably overcomplicated, I'll be grateful for letting me know.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on hyperavtr's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License