So I'm not the best at CSS really, but I usually manage to do a lot by trial and error. And I figured out a way to do this as well, but it's a bit too time-consuming.
I want my website to be almost 100% green in reference to an old nokia phone. It's problematic when I want to include something from the outside, like, let's say very colorful melonland button.
The little workaround I have for now is having a green overlay that disappears when you hover over it. However, I always have to set up the size manually, or else it breaks either the position of the image, or it thinks the size takes the whole width of the webpage. So if I would like to have a lot of different sized images with this effect and were to manually set the size everywhere... Oof.
There is probably some kind of very easy solution to it but I'm messy and I got lost in what I'm doing. I would appreciate any help.
I imagined putting something like "width: 100%" somewhere would work but it just doesn't no matter what I do.
Simplified code I have, hopefully I didn't miss anything.
CSS part
.imgoverlay {
mix-blend-mode: multiply;
background-color: #00ff80;
position:absolute;
}
.imgoverlay:hover {
opacity: 0;
}
Example of a HTML part that actually works
<div style="position:relative; margin-left:30px;" >
<div class="imgoverlay" style="width: 100px; height: 100px;"></div><img src="images/varhin.gif">
<div class="imgoverlay" style="width: 75px; height: 75px;"></div><img src="images/lunn2.gif">
</div>