I have a image in 16:9 (1920 x 1080) of a draw with some led light strips on it.
My objective is to implement a div of a gradient color to simulate a light effect, but I can only make this when the image is static on the background.
When I implement a object-fit: cover; property, the light div doesn't keep his position on the right area.
I have already tried to use background-image instead of <img> tag and tried to create a wrapper with position relative and absolute. Also, I'm using only responsive values into the css (percentages and viewport).
I think that the problem is in the fact that the object-fit: cover adjusts the image with zooms, and the div image doesn't follow that.
That's the image I'am using on this project. There's already a pink light coming out the LED strips on the draw, and I'm trying to make a new light above the pink one with a div.
This green light is the div that I'm trying to put above the pink light:

.cafe-image div.left-light {
background: linear-gradient(
to top,
rgba(0, 0, 0, 0),
rgba(101, 221, 137, 0.671)
);
width: 40%;
height: 30%;
transform: skew(28deg) rotate(15deg);
position: absolute;
top: 8.9%;
left: -4.8%;
}
It is not perfectly positioned, but I'm just trying to keep this green light on the right spot:

...But when I resize the tab, that green light just change his position:

In short, I would like to leave this div of the green light always in that specific point of the image, no matter the page size.
Full code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
overflow: hidden;
}
.cafe-image {
position: relative;
}
.cafe-image img {
object-fit: cover;
width: 100vw;
height: 100vh;
}
.cafe-image div.left-light {
background: linear-gradient(
to top,
rgba(0, 0, 0, 0),
rgba(101, 221, 137, 0.671)
);
width: 40%;
height: 30%;
transform: skew(28deg) rotate(15deg);
position: absolute;
top: 8.9%;
left: -4.8%;
}
</style>
</head>
<body>
<div class="cafe-image">
<img src="https://i.postimg.cc/jq6xMxMC/cafe.jpg"/>
<div class="left-light"></div>
</div>
</body>
</html>
