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

Responsive Testimonials Using Grid and FlexBox Css

Shikur•140
@shikurassefa
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 most proud of my dedication to achieving my goal of mastering CSS Grid in order to build responsive layouts. For this specific project, I went beyond just desktop and mobile layouts by also designing a smartphone-specific version, which really challenged and improved my design thinking.

Looking ahead, I want to dive deeper into more complex layouts and advanced React projects. My ultimate goal is to compete on global platforms like Upwork and establish myself in the international market as a skilled front-end developer.

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

One of the main challenges I faced was designing specifically for smartphone screens. Initially, I believed that using a CSS Grid setup like grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) would make the layout fully responsive across all devices. However, I realized that when certain elements span multiple rows and columns, this approach alone wasn’t enough—especially on smaller screens.

To address this, I learned that media queries were essential for fine-tuning the layout. Ultimately, I resolved the issue by applying grid-column: auto !important; to each element, ensuring they adapted properly within the grid on smaller viewports.

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

I would like help with better aligning the content inside each element to maintain balanced spacing. I used Flexbox for layout, but I faced an issue: when I set justify-content: space-between, cards with smaller content ended up with a large gap between the header and the description, which didn't feel user-friendly.

When I switched to justify-content: flex-start, the content aligned at the top, but it didn't match the intended design, which expects a more balanced and centered feel within each card. I’m looking for better techniques or best practices to handle this situation, especially for cards with different content lengths.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Andrey•4,400
    @dar-ju
    Posted about 2 months ago

    Hi Shikur!

    I'll try to answer your question.

    If you look at the design layout, you can see that there is approximately the same distance between the author block, the title and the quote. So we define a common flex block, arrange the column and specify a fixed gap, inside we have 3 elements. Before doing this, remove ALL the margins that these elements have, including -20px. Negative indent values ​​should be used in extreme cases, in 99.9% of cases you will not need them.

    In such cards there will always be more content somewhere, less somewhere. The fact that one card is completely filled, and the other has free space at the bottom is normal.

    I would like to draw your attention to a few things:

    • in a screen resolution of 1150-1200px, for some reason only the last card is shrinked and by 1150px it is very thin. It would be better if they all were shrinked.
    • 768-1100px it would be better if the same card at the bottom was the full width of the screen
    • I see in the code !important in the project that you write yourself and you have access to the files !important should not be used. Let's say you need to edit someone else's project and you do not have access to the css file, only to the html, then you can't do without this modifier.

    Everything else is great, good luck with your development!

    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