Design comparison
Solution retrospective
I had issues choosing the proper width/height. The image size would be cropped out or re-size in weird ways. I think maybe just uploading the image in a div and then finding some other way of overlaying the bg-color (position absolute?) would have been better in this case. Any advice?
Community feedback
- @RJC26Posted over 2 years ago
Hey man looks great, so im pretty new to coding myself but got this advice which helped me with a similar problem i was having. If you create a div and place your img tag inside that div, you can set the height and width of that div however you want and then set the height and width of the img to 100%. This means that you are saying you want the image to always be 100% of the size of the div so it helps for responsive aswell as sizing! Not sure if this helps but I hope I explained it well enough!
Also if you had put the image in a div you could then set the background color of the div and change the opacity of the image so you get the blend of color!
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