starts Preview

Solution retrospective
Can anyone tell me how to add the purple effect in image and how to change the images according to screen view-port. thanks
Please log in to post a comment
Log in with GitHubCommunity feedback
- @aliadelharrat
Hello, congrats on completing this challenge
I've made a codepen explaining how to add that purple effect on a image (there are probably many ways to do this, but this is what I like)
.image-wrapper .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: purple; opacity: .5; }
See my code here: Codepen
- @WesSno
Hello @00YellowLemon, To create a color overlay over the image, you can follow the steps below.
- Create an empty image <div> and give it a class like .img or .pic
- Next is to create an empty <div> within the image <div> where the color overlay will be inserted. Give it a class of your choice. Example: class = "overlay"
- In your css, select the image <div> with its class and give it a background-image with the image given in the designs. Background-repeat should be no-repeat. Background-position and size can be center/cover respectively.
- After that, select the overlay <div> and give it a background-color and height.
Also, the image should be on the right side. If you put it on the right side and you want the image to come on top of the text during the media query, you can use: ****flex-direction: column-reverse; Hope my suggestion was 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