+ 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?
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.
+ 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!
+ 2
Okay! Happy learning! :)