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-main

sohaib 50

@muffin50

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


This Is My First Challenge

Community feedback

Eray 1,410

@ErayBarslan

Posted

Hey there, design looks good and it's responsive. Excellent work as your first solution!

  • You should provide the images file. background-image: url(images/image-header-mobile.jpg); here it looks for the file but doesn't exist.
  • After deploying the image, that approach still wouldn't work to change the background color of image. You can use combination of mix-blend-mode and opacity with a container div and placing image inside it like:

HTML

<div class="img-container">
      <img src="images/image-header-mobile.jpg" alt="people working in office">
</div>

CSS

.img-container {
  background-color: hsl(277, 64%, 61%);
}

img {
    display: block;
    width: 100%;
    opacity: .7;
    mix-blend-mode: multiply;
}
  • Lastly, you can remove max-width from @media (min-width:415px) and (max-width: 1440px) {..} Because it'll return the mobile design when it's wider than 1440px. Excellent work again and happy coding :)

Marked as helpful

0

sohaib 50

@muffin50

Posted

@ErayBarslan thank u man Im happy that u commented here

0
Lucas 👾 104,400

@correlucas

Posted

Hello Sohaib, congratulations for your solution!

You've a litte issue with the image import you forgot to indicate the correct path for the image indicating with . / the folder. Here's the correct import:

 background-image: url(./images/image-header-mobile.jpg);

See if works now

Hope this helps, happy coding!

Marked as helpful

0

sohaib 50

@muffin50

Posted

@correlucas thank you so much for the advice , I'll try fix it as u told me

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