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 with Flexbox

Zaid 225

@ZaidMarrie

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


I have been having difficulty with controlling images and I was unable to get the image to fill its parent container without a min-width. If there is another I could accomplish simple or better results please let me know. Feedback is always much appreciated.

Community feedback

Ayoub1Dev 195

@Ayoub1dev

Posted

HTML

<div class="img"></div>

CSS

.img {
    grid-area: img;
    background: url(/images/image-header-mobile.jpg);
    background-color: var(--img-1-color);

    background-blend-mode: overlay;
    background-repeat: no-repeat;
    background-size: cover;
}

Marked as helpful

0
Ayoub1Dev 195

@Ayoub1dev

Posted

I did not use an img tag in HTML, I just set the background image of the container div. Check out my code for insight!!

Marked as helpful

0

Zaid 225

@ZaidMarrie

Posted

@Ayoub1dev Thank you for your feedback. I appreciate it.

0
Ayoub1Dev 195

@Ayoub1dev

Posted

@ZaidMarrie No problem, we are here to help each other.

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