How to center a video [closed]

To center an element, you will also have to style it’s parent element too. So let’s say, you video has a structure like this:

<div class="parent-class"> 
    <video class="wp-video">
    </video>
</div>

To center the video, you will have to give it’s parent a width. Using:

.parent-class{
    width:100%;
    display:block;
}

Now, you can use this to do the final touch:

.wp-video {
    text-align: center;
    margin: 0 auto;
    max-width: 400px;
    display: block
}

Notice that you have to define a width for this video, since your video has a width of 1920px, which for sure will overflow most of the screens.

error code: 523