+ 2

How do I align my video?

Tried to align video to centre of page like this: <video align="center" controls> Why will this not work? How else should I go about it?

31st Oct 2018, 7:29 PM
FinBillings
FinBillings - avatar
3 ответов
+ 5
Like jelger.js mentioned, it's best to use CSS for styling. The align attribute is not supported HTML5 (though it does seem work for certain tags). You can do something like <video class="center" controls> in HTML, and in CSS, add .center { display: block; margin-left: auto; margin-right: auto; width: 75% } Specifying the width (either in HTML or in CSS) may be necessary. A 100% width cannot be centered.
31st Oct 2018, 8:21 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 4
jelger.js Kishalaya Saha thanks for your help. Sounds like I need to get started on CSS then! I am a complete beginner to all coding... I'll come back to this one!
31st Oct 2018, 9:19 PM
FinBillings
FinBillings - avatar
+ 2
Okay! Happy learning! :)
1st Nov 2018, 3:11 AM
Kishalaya Saha
Kishalaya Saha - avatar