How can I adjust the video to fit the height of parent div?
I'm working on fitting the background video to fit the parent div but it is not adjust to the height within the media query. Any ideas on how I can fix this?
.hero{
position: relative;
z-index: 1;
height: 90vh;
width: 100%;
}
#myVideo {
position: absolute;
right: 0;
bottom: 0;
z-index: -1;
filter: brightness(65%);
height: 100%;
}
@media (min-aspect-ratio: 16/9) {
#myVideo {
width: 100%;
height: auto;
}
}
@media (max-aspect-ratio: 16/9) {
#myVideo {
width: 100%;
height: auto;
}
}