Stats Preview Card with Flexbox

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.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Ayoub1dev
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 - @Ayoub1dev
I did not use an
img
tag in HTML, I just set the background image of the containerdiv
. Check out my code for insight!!Marked as helpful
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