Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 9 months ago

Vanilla CSS grid

Zarak•100
@zarak
A solution to the Testimonials grid section 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?

I'm starting to get a little more comfortable with CSS grid. This project was a great way to develop that further. I used the nth-child pseudo-selector to order and style individual elements, but next time I think I would rather use specific classes to select individual items.

I initially thought the quotation mark background would be difficult, but I was able to do it quite easily using absolute positioning and a translate transform, along with z-index to make sure the card text appears on top.

What challenges did you encounter, and how did you overcome them?

I'm not sure if I implemented the grid in the best way. I ended up using order. I wonder if it's possible to write the grid in a way that it just flows correctly and is thus responsive, including for mobile, without making a lot of changes to each card. I had to reset the order attribute for each card, for example. I did use span instead of hard-coding the start and end rows though.

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

I'd like some feedback on how I could improve my CSS grid setup. Also, is it okay to use nth-child selectors as I did, or is it better to use specific CSS classes? My hunch is the latter, but I'm curious to hear what others think.

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 Zarak'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