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

Responsive Stats preview card with CSS, Flexbox and Grid.

@anhoang241998

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 everyone, I had just finish the challenge. Any comments or suggestions on how I could have done this challenge better or made it more responsive would be greatly appreciated. Thank you in advance.

Community feedback

Juveria Dalvi• 1,375

@JuveriaD

Posted

Hey..😊 So the accessibility issue says you should have <main> tag which is a semantic tag, wrap your all divs inside the main tag except for the div with class attribution that should be wrapped in <footer> tag.

Marked as helpful

1
darryncodes• 6,430

@darryncodes

Posted

Hi Nguyen,

I second what Davide has said, great solution but could be even better if you introduced a mobile version.

One way to do it is to change your grid declaration with a media query

@media only screen and (max-width: XXXpx) { .wrapper { grid-template-columns: 1fr; } }

and add grid-row: 2 / 3; to .stats-container at the same media query to swap the order of the image and content.

Here is a really comprehensive grid guide

All the best!

Marked as helpful

1

@anhoang241998

Posted

@darryncodes Hi darryncodes,

I really appreciate on your feedback. I will look look into your guide website and change the solution. Cheers!

Regards, Nguyen Hoang An

0
Davide• 1,725

@Da-vi-de

Posted

Hi, it's a good result but it could be perfect, there's just a problem with the responsiveness of the website.

  • First thing first i encourage you to change approach and start the mobile version, that's the professional and modern way of working. I believe you work with the dev tool set on responsive mode, just determine the width you want to work at, for example 350px, build your project and then add media queries min-width: ... trying to respect devices screen size!

  • I didn't do this challenge but i guess the image shouldn't be cropped because it's the desktop version, you change it too early, so i think it's better keeping the column and resize it for tablet width.

Hope it helps, keep coding :-)

Marked as helpful

1

@anhoang241998

Posted

@Da-vi-de Hi Da-vi-de,

Much appreciated for all your feedback. As you noted that I need to focus on mobile first rule and for the image, you were right, I cropped it too early. I would love to change the solution in the near future. Finally, thanks for your feedback. Cheers!

Regards, Nguyen Hoang An

1

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