Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

My 3-Column Preview Card Component Using Nth-Child Pseudo-Selectors

P
Arthur•290
@ArthurPog
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is my solution of the 3-column preview card component using nth-child pseudo-selectors only. I had been learning about them and CSS variables and wanted to apply my theoretical knowledge somewhere to help me understand it better. I get that it is probably not the most practical solution in this case.

Examples of how I selected the button in the first column:

main div:nth-child(1) > button {color: var(--bright-orange);}

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 Arthur'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
  • Use cases

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