I have a few see-through click elements over a video.. when changing the aspect ratio of the browser the positioning of the elements messes up which causes click action to not happen when you click on an animation.
I use % but for some reason it still doesn't position it correctly on multiple screen sizes.
CSS:
#vidKlik1{
width: 8%;
height: 30%;
top: 148%;
left: 16%;
}
HTML:
<div class="popup">
<video preload="auto" autoplay="autoplay" loop="loop" id="background2">
<source src="background/background2.mp4" type="video/mp4"> </source>
<source src="background/background2.ogv" type="video/ogg"> </source>
<source src="background/background2.webm" type="video/webm"> </source>
</video>
<a href="#popup-box" class="popup-window">
<img src="images/klik.jpg" id="vidKlik1">
</a>
<a href="#popup-box" class="popup-window">
<img src="images/klik.jpg" id="vidKlik2">
</a>
<a href="#popup-box" class="popup-window">
<img src="images/klik.jpg" id="vidKlik3">
</a>
<a href="#popup-box" class="popup-window">
<img src="images/klik.jpg" id="vidKlik4">
</a>
</div>
and for some reason I also have to use top: 148% because if I take top: 100% it only positions it 50% from the top of the page, right in between 2 video's
Is there any way to fix this? I'am already using % but for some reason it just won't position the image correctly.. I've also tried using VH and VW, I just don't know which other things I could do to make the image always appear on a certain position when the video behind it scales.
In short: I have an image which I want to scale with the video behind it to make the video have clickable interactions, however it often goes too far down.
To follow up on my comments, here's a working fiddle
CSS
HTML
The important parts
popup
needs to beposition:relative
<a>
needs to have an id so you can position it independently of the others