Can someone help I have googled so much I cannot change the img color
Design comparison
Solution retrospective
Okay so I have a few issues, first is I cannot for the life of me work out how to change the color of the image, secondly I cannot work out why when i shrink the page it squashes up rather than all shrink evenly like in the example, someone please help!
Community feedback
- @mauger1998Posted about 2 years ago
The first part about the picture tag is great advice thankyou I will do that now but the advice about the image color doesnt work, what you said makes it the same color as the background whereas I want it the same color as the word "insight"
0 - @correlucasPosted about 2 years ago
👾Hello Mauger, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Use the tag
<picture>
to wrap the product image inside the html instead of using it as<img>
orbackground-image
(with the css). Using<picture>
you wrap both images (desktop and mobile) and have more control over it, since you can set in the html when the images changes setting the screen size for each image.ote that for SEO / search engine reasons isn’t a better practice import this product image with CSS since this will make it harder to the image.Here’s the documentation and the guide to use this tag:https://www.w3schools.com/tags/tag_picture.asp
2.If you want to add the same effect of the design for the image overlaying it with
purple
there's a shortcut that is by usingmix-blend-mode
with the modemultiply
and with an opacity aroundopacity: 82%
. See the code below:img { mix-blend-mode: multiply; opacity: 82%;}
✌️ I hope this helps you and 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