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

Responsive Testimonials Grid Section using CSS Grid

bem
P
Jayco•470
@jayco01
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 proud of how I successfully implemented CSS Grid to create a structured and fully responsive layout. Ensuring that the testimonials aligned correctly across different screen sizes was a challenge, but refining the grid-template-areas and spacing improved the overall design. I also liked how the box shadows and background images enhanced the visual appeal.

Next time, I would focus more on accessibility improvements, such as adding ARIA labels and better contrast for readability. Additionally, I’d explore adding subtle animations or hover effects to enhance user interaction.

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

One of the biggest challenges I encountered was aligning the testimonials properly using CSS Grid while ensuring even spacing across different screen sizes. Initially, some elements weren’t positioned as expected, leading to inconsistencies in the layout. To overcome this, I refined my grid-template-areas and explicitly defined grid-template-columns instead of relying on automatic placement. Adding gap between grid items also helped maintain consistent spacing.

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

I would love feedback on my CSS Grid implementation, particularly in ensuring that the testimonials are evenly spaced and well-aligned across different screen sizes. While I used grid-template-areas to structure the layout, I wonder if there’s a more efficient way to achieve the same result or improve its responsiveness further.

Additionally, I’d appreciate any insights on background image placement. I used background-position and background-size to position a decorative image within one of the testimonials, but I’m curious if there’s a better approach to ensure consistent positioning across all screen sizes.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adesh Katiya•420
    @adeysh
    Posted 4 months ago

    Hey @jayco01! Your page looks visually stunning and very accurate to the design as well.

    The code is semantic as well and I also like how you have used <picture> tag to wrap the images and <strong> tag to show bold text for the screen readers. I realize I should use this as well 😅. It looks good on all screen sizes and readable.

    • I would suggest making the wrapper testimonial__grid a section inside the <main> tag since it can contain other types of content as well besides grid section.
    • Your naming for the bem classes for individual cards are acccording to the authors (testimonial__clifford) rather this, considering bem conventions you could use a testimonial-card or card as block and include the styles for individual authors as modifiers like (testimonial-card--clifford). You can use all the styles for an individual card here also removing the class for colours, padding and font-styles like testimonial--white.
    • Update the properties for font-sizes, font-family and box-shadow to use a custom variable since you have used it multiple times.

    Otherwise this looks awesome 😇💫

    Marked as helpful

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
Frontend Mentor logo

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub