Search code examples
htmlcssvideohtml5-video

HTML5 video positioning to the top


Does anyone know how to position the video content to the top, like "position: top" with background images?
I have a video that is 1920x1080px, but the div is currently using 1920x550px. I have tried to search the World Wide Web without any luck.

      <video playsinline autoplay muted loop>
          <source src="vid/vid_3.mp4" type="video/mp4">
          Your browser does not support the video tag.
      </video>

Kindly,
Louis


Solution

  • Thanks for the reply. Unfortunately it didn't work, but I've managed to fix it by setting the height:

    <video playsinline autoplay muted loop style="height: 1080px;">