0

How do I resize the videos I put in my programs.

I put a video and when I run the program the video shows up even bigger than my laptop screen.

15th Dec 2017, 6:05 PM
Nik
Nik - avatar
7 Respuestas
+ 4
Could you post a small, representative sample in CodePlayground? In general you can use CSS to resize the element (e.g., width: 100vw; height:100vh) but that really may depend on a few things and people here probably won't mind the opportunity to practice.
15th Dec 2017, 7:00 PM
Kirk Schafer
Kirk Schafer - avatar
+ 4
Please use the code playground so we can see what the output is. It will make it easier for us to help you.
15th Dec 2017, 7:30 PM
Learnsolo
+ 2
video tags are text 'inline' elements; display:block switches them to allow repositioning and 'margin' does the actual move. Simpler version: video { margin-left:auto; margin-right:auto; display:block; } Play-with-values version: video { border:1px dashed darkgrey; width: 45vw; height: 70vh; margin:0 auto; display:block; } If you're going to center more than one video, you may want to use a CSS class instead.
15th Dec 2017, 9:15 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
Thanks
15th Dec 2017, 9:41 PM
Nik
Nik - avatar
0
<video height="auto" width="100%"></video> or if you embed youtube video, <iframe height="auto" width="100%"></iframe>
15th Dec 2017, 7:01 PM
Catty
0
Okay. I resized but then how do you change horizontal alignment of the video cuz I tried using align attribute but it's not working.
15th Dec 2017, 7:56 PM
Nik
Nik - avatar