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

Stats preview card component (💬 HTML & CSS)

Alexandre JOLIET• 170

@alexandre-joliet

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


Hey!

Getting back after a while without programming. Good exercise as a warmup to remind basic concepts before starting more complex projects!

Community feedback

Hassia Issah• 50,670

@Hassiai

Posted

Give the alt attribute in the img a value. The value of the alt attribute is the description of the image. For decorative images like icons, there is no need to give it an alt value, for more on alt attribute Click here.

For the color of the image, give .picture-section a background-color of soft violet and give the img a width and height of 100%, object-fit: cover, mix-blend-mode: multiply and opacity:0.8

.picture-section{
background-color: hsl();
}
img{
width: 100%;
height: 100%;
object-fit: cover;
mix-blend-mode: multiply;
opacity: 0.8;
}

To center .card-main on the page using flexbox, replace the height in the body with min-height: 100vh. there is no need to give the body and .card-main a margin value.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here and here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

1

Alexandre JOLIET• 170

@alexandre-joliet

Posted

@Hassiai thank you for your feedback!

Quick question for the image: as it serves no purposes except to be decorative here, the alt text is it still necessary? I based my work on this article.

And I'm starting to get rid of the px unit for my next projects 😉!

Thanks!

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