video in Html5 with fixed height and malleable width

Asked

Viewed 81 times

1

I have to make a video where it has a fixed height and a width of 100%, the problem is that when I use height:100% does not work and if I use height:auto; width:100%; also does not work because the video is the original height of it, what I would like is for the video to be 100% high and lagura but respecting the container that it is. If anyone has any ideas I appreciate that all the ones I found do not work. If anyone knows with iframe can also be.

CSS

.container{ width:100%; height:732px; float:left; position:relative; }
.container video{ width:100%; height:100%; float:left; }

HTML

<div class="container">
    <video controls src="videos/video1.mp4"></video>
</div>

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.