Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Testimonials-grid Solution

Giulia 210

@GiuliaT97

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I didn't have any major difficulties, it was the first time I used grids successfully. I usually prefer to use flexbox. Any advice is welcome!

Community feedback

Sicro01 60

@Sicro01

Posted

Hi,

Looks good - only one suggestion....

If you view the site on a much larger screen size there is no constraint on the width of the cards. Not a big issue for this site but it you wanted to experiment you can achieve this by changing your "grid-template-columns" statement:

From: grid-template-columns: repeat(4, 1fr);

To: grid-template-columns: repeat(4, minmax(smallest size, largest size));

Replace the smallest/largest with whatever works; you can also adjust the repeat aspect if different column need different sizes. The "largest size" sets the max width of the column.

One further tip - you could set the sizes using a CSS variable, defined say in your root (as you've done with your font) and play around with the numbers there.

Good luck!

0

Giulia 210

@GiuliaT97

Posted

It is true! I forgot to set a max-width.... I'll use the method you suggested, thanks.@Sicro01

1

@0xabdulkhaliq

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

HTML 🏷️:

  • This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to non-semantic markup, which lack landmark for a webpage
  • So fix it by replacing the <div class="grid-container"> element with the semantic element <main> along with <div class="attribution"> into a <footer> element in your index.html file to improve accessibility and organization of your page.
  • What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like <div> or <span>
  • They convey the structure of your page. For example, the <main> element should include all content directly related to the page's main idea, so there should only be one per page

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

0

Giulia 210

@GiuliaT97

Posted

Thanks, I will pay more attention with the next challenges!@0xAbdulKhalid

0

@0xabdulkhaliq

Posted

@GiuliaT97 Glad you found it helpful ! 🤠

0

Please log in to post a comment

Log in with GitHub
Discord logo

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