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

HTML CSS Grid and Flex

Pascal 40

@CodingEule

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello,

not happy at all with the desktop version. Thankfull for any clue, how to improve.

Thanks

Community feedback

@asbhogal

Posted

Hi Pascal,

This is a good attempt. I've outlined below what you need to do to get it closer to the mockups:

  • Firstly, remove the width: 100vw and width: 300px on your parent container. Neither should be used, as they cause overflow issues, which is what's happening here. You should set a max-width of, for e.g., 1000px and a width: 100% so anything below the max-width in the viewport will mean the content will occupy the full space it can.
  • You need to replace the current way the img elements are being used in the div with a <picture> element for them instead. Here's a link from MDN explaining this Link
  • Use CSS grid on the parent element for the columns and change this flow for viewports lower than 600px.
  • Locally host your Google Fonts for privacy and performance reasons. Here's a good video explaining this in further detail Link

Hope this helps!

Marked as helpful

1

Pascal 40

@CodingEule

Posted

@asbhogal

thank you very much for your time. I really appreciate.

Changed already the width, grid and tried on picture, but seems like it doesn't worked how expected. So I will try tomorrow again. Then I will also change the fonts.

Updated already the Repository if you want to check.

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