Design comparison
Solution retrospective
I had a hard time adding the color on top of the image, I hadn't tried something like that yet. But I decided to put another div over the div with the image, I added a background-color and opacity of 0.6, I don't know if it's correct.
Community feedback
- @catherineisonlinePosted almost 2 years ago
For the image, I did something like this, I hope that helps:
<div class="image-container"> <img class="main-image" src="images/image-header-mobile.jpg" alt=""> </div> .image-container { display: inherit; position: relative; width: 100%; border-radius: 0 10px 10px 0; background-color: hsl(277, 64%, 61%); } .main-image { width: 100%; height: 100%; position: relative; background-size: cover; border-radius: 0 10px 10px 0; mix-blend-mode: multiply; opacity: 0.75; }
0 - @HassiaiPosted almost 2 years ago
There is no need for the <section tag in your html and the .card-container in your css. add background color:hsl(277, 64%, 61%); and background-blend-mode:multiply to the .img-container instead of .overlay. To center a content on a page add min-height:100vh; display: flex; align-items: center; justify-content:center; to the body. Give the .container a width value , there is no need for the height value. For a more responsive page , give the flex-items a width value ,replace the height value with a padding value , in your code this applies to .text_container. give .text_container a background-color. You forgot to add a media query for the mobile design. Use rem or em as unit for the padding , margin and preferably rem for the font-size for more on this watch this https://youtu.be/N5wpD9Ov_To Hope am helpful HAPPY CODING
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