Home > Mobile >  Why doesn't the div sizer container resize the video?
Why doesn't the div sizer container resize the video?

Time:10-17

the div sizer doesn't resize the video on the website for some reason, can you help me with resizing this video?

/* Vid*/
video {
position: relative;
top: 1400px;
right: -100px;
}
    
video:before,
video:after {
content: '';
left: 500px;
position: absolute;
}
  
.sizer {
  width: 100px;
}
<div >
<video src="vid1.mp4" autoplay controls></video>
</div>

CodePudding user response:

if you want to resize your video, you should resize the video size in html, not the div, like this

/* Vid*/
video {
position: relative;
padding: 4rem;
height: 300px;
width : 600px;
}
    
video:before,
video:after {
content: '';
left: 500px;
position: absolute;
}
<div >
<video src="vid1.mp4" autoplay controls></video>
</div>

  • Related