Responsive Testimonials Grid Section using CSS Grid

Solution retrospective
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.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @adeysh
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 atestimonial-card
orcard
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 liketestimonial--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 - I would suggest making the wrapper
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