Set (resize) Height Width of HTML5 Video using CSS in ASP.Net

RichardSa
 
on Jul 28, 2021 01:03 AM
1680 Views

I added two videos to my web page but one of the video seems to be too large and coverts half of the page.

The other video is okay. please forum how can I resize video in the video frame to fit in well on the page?

I have tried everything but maybe the video type is large

HTML

<div style="max-width: 90%; margin: auto; padding: 10px;">
    <br />
    <h5 style="color: #0d1a35; font-family: Tahoma; font-weight: bold; text-align:center;">MIRACULOUS SUPERLIFE STEM CELL(30) CURED THIS LADY FROM HIGH BLOOD PRESSURE</h5>
    <div class="col-sm-12">
        <video id="VideoPlayer" src="<%=ResolveUrl("~/Videos/Superlife_STC30_stem_cell_therapy___Facebook.mp4")%>" controls="controls" autoplay="autoplay" loop="loop" muted defaultmuted playsinline />
        <p style="font-size: 2.5vmin; width: 100%; color: #ff0000; font-weight: bold;">Lady who was diagnosed with High Blood Pressure; but SuperLife STC 30 has given her joy - she is cured from High Blood</p>
    </div>
    <hr />
</div>

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jul 28, 2021 01:17 AM

Hi RichardSa,

Set the HTML5 Video width to 100% and height to auto.

<video id="VideoPlayer" width="100%" height="auto" src="<%=ResolveUrl("~/Videos/Superlife_STC30_stem_cell_therapy___Facebook.mp4")%>" controls="controls" autoplay="autoplay" loop="loop" muted defaultmuted playsinline />