@devhnry
Posted
Hello there ๐. Good job on completing the challenge !
I have SOME suggestions about your code that might interest you.
-
As regards your solution giving errors on the accessibility reports. This as a result of not having a Landmark. To solve this issues, add a
<main></main>
just outside the<div class="content"></div>
and this will fix the issue. More on LandMarks -
To help with the effect on the image, Try adding a
<div class="overlay"></div>
element just right before the<div class="image" ></div>
container or<img>
element. Now put both<div class="overlay"></div>
container and the<div class="image" ></div>
container inside a<div class=image__box ><div>
.This will serve as the Parent Element of both . Then add the following styles below... Example
HTML
<div class=image__box >
<div class="overlay"></div>
<div class="image" > ... </div>
<div>
CSS
.image__box{
position: relative;
}
.overlay{
position: absolute;
top: 0;
left: 0;
width: 100%
height: 100%
background: ... ; // Color goes here
}
.image {
background-image : url(...) ; // If used a url instead of placing it directly in the HTML
mix-blend-mode: multiply;
opacity: 75%;
object-fit:cover;
}
- TIP : Check out the
<picture></picture>
element as this can help with switching between two images based on viewport.
I hope you find these comments helpfull! ๐ And I was able to answer your questions
Happy coding!
Marked as helpful
@barbaradamasdev
Posted
@devhnry Thanks, you helped a lot. I'll the effect like you said. I really appreciate it. ๐