How do I keep the width of the video the same while changing the height in smaller screens?
I tried the following code and at first it was ok when the text is in the center of the video which is what I want. However as the screen gets smaller the text isn't going to the center no more.
2 Replies
The text is still in the center, the issue is the video is keeping it's regular aspect ratio, so it's leaving the bottom empty.
If you don't mind the video being cropped, then
If you don't want the video to crop at all, you won't be able to use a fixed height.
Ahhhh
object-fit: cover;
I didn't know that you can use it without a background in the css. Thanks it worked perfectly 🙂
Also good to meet ya, love your videos.