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

Mobile First |Stats-preview-card-component

@snake321

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


HI I am new in CSS so Plz let me know What I have done wrong in my css And how can improve my css #css

Community feedback

Vanza Setia 27,795

@vanzasetia

Posted

Hi! 👋

Good effort on this challenge! 👍

Before diving into your CSS, there are a couple of things on the HTML that you need to fix/improve.

  • The card is the main content of the page. So, it should not be wrapped by aside element (including the image).
  • The attribution should live outside the main landmark. It should live on its own landmark which is footer landmark.
  • There are two versions of the image-header, the mobile and the desktop version. This is a great situation to use picture element. By using picture element you can tell the browser to show a suitable image for different devices.

Now, for the CSS.

  • For margin, I recommend using rem unit instead of the percentage unit. rem behaves more consistently than the percentage unit. Unless you make sure everything is okay when you use the percentage unit then it's best to use rem unit.
  • Lastly, the text color for the attribution is not having enough contrast. It is impossible for me to read it. So, my recommendation is to change the color to white.

Hope this helps.

Marked as helpful

1

@snake321

Posted

@vanzasetia Thanks for your feedback It help me a lot.Thank you so much

0
Vanza Setia 27,795

@vanzasetia

Posted

@snake321 No problem! I am happy to know that my feedback helped you. 😉

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