Rosie1969 Rosie1969 - 1 month ago 9
CSS Question

Two videos on a webpage

I have two videos on my page that are on top of each other. How do I move the second video to the center?

I have tried

<div>
tags with the
class="video"
attribute and the
text-align: center;
in css and nothing.

It remains the same when I go to preview my page and I do refresh every time.

I am getting frustrated because I can't seem to find a solution.

I just want to move the second video to the center. Please someone help me.

Answer

Place your video in a container and give it a width less than page width and margin-left and margin-right auto, when container, containing the video will be in center, the video will be in center automatically.

<div style="margin:0px auto;width:60%"><video></video></div>
Comments