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

using HTML5 and CSS

lsh 160

@SH-Lee2

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, I'm preparing for a front-end developer. It was hard to make an css during the challenge, but let me know if there is a problem after looking at this. Sorry for my bad english(Thank you 😁)

Community feedback

Alejandro 100

@thealexgonzo

Posted

Instead of having the preview card occupy the full width, you can give it a percentage width, for example 80% is common one and the set the top and bottom margin to 0 and the left and right margin to auto like so:

width: 80; margin: 0 auto;

0
P
Fluffy Kas 7,735

@FluffyKas

Posted

Hey, your solution looks fine but I have a few suggestions for you:

  1. Your font-family doesn't work (or forgot to add it?).

  2. You are using <span> excessively. It's not really a semantic tag and while it's fine to use it when needed (for inline styling, like for the "insights" word in this challenge), it should not be used instead of more semantic html tags like headings and <p>

  3. The outer section could be swapped for main to get rid of the issues in the accessibility report.

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