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

@MohmedElshaarawy

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Hassia Issah 50,810

@Hassiai

Posted

Replace <div class="card"> with the main tag to fix the accessibility issues and add the alt attribute alt=" " to the img tag to fix the error issue. the value for the alt is the description of the image. click here for more on web-accessibility and semantic html

For tthe color of the image, give .images a background-color of soft-violet and give the img a width of 100%, height of 100%, objrct-fit of cover, mix-blend-mode of multiply and opacity of 0.8.

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

There is no need to give the body position fixed and its properties. To center .container on the page using flexbox, add min-height: 100vh to the body. There is no need to give .container a height 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

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

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