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
- @Ayoub1devPosted over 3 years ago
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 helpful0 - @Ayoub1devPosted over 3 years ago
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 helpful0
Please log in to post a comment
Log in with GitHubJoin 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