I have a parent div which contains a video video-container.
I want to place icons on top of the video which are hyperlinks. So I made a div for the icons link-container and placed it inside the parent div.
Now if I resize the browser window video resizes but the child div remains the same size. I want the icons inside the child div to resize accordingly with the parent div so they always remain in the same position overlaid on the video (as if the icons were part of the video).
<div class="video-container">
<div class="myvideo">
<video />
</div>
<div class="link-container">
<a href="https://www.link.com/">
<img class="imglink" />
</a>
</div>
</div>
.video-container {
position: relative;
}
.link-container {
position:absolute;
top:70%;
left:10%;
}
.imglink {
width: 100px; /*i also tried auto here*/
height: 100px; /*i also tried auto here*/
content: url('./assets/img.png');
}
Thanks.