Design comparison
Solution retrospective
Hello! This is my first SASS project!
///(FIXED: setting display: block as inline style in the <img> tag)///
My question here is: when i change to the mobile version, the hero image does not fit properly in the container so it gets a purple border bottom (that is the background-color of the .img-area container). I set the img width to 100% and then:
.img__area { background-color: $soft-violet;
img {
object-fit: cover;
height: 100%;
mix-blend-mode: multiply;
opacity: .9;
}
}
Am i doing anything wrong?
I Would love to hear some suggestions and advices for this one :)
Thanks!
Community feedback
- @JoseLuisFVPosted about 3 years ago
I had the same issue when i did this, you can fix it adding display block in the img. link
Marked as helpful0@flp-pcllPosted about 3 years ago@JoseLuisFV Thanks, Jose! I had to set display:block as inline style in the img tag, it was not working on the .scss file, but it's fixed! :)
0
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