Centering a video

Permalink
Hi,
Is it possible to center the video player (for me it always runs on the left side).
Same problem when embedding a video from Dailymotion : trying
<iframe align="middle" frameborder="0" width="480" height="270"  src="//www.dailymotion.com/embed/video/x9qyxp" allowfullscreen></iframe>


with or without the option align="middle" the result is the same : video on the left

Thanks,
V.Le Mieux

View Replies:
axelhahn replied on at Permalink Reply
axelhahn
Hi,

a fast solution is to wrap it with a div having the css rule "text-align: center":

<div style="text-align: center">
<iframe allowfullscreen="" frameborder="0" height="270" src="//www.dailymotion.com/embed/video/x9qyxp" width="480"></iframe>
</div>


Better you use
<div class="video">
 ...
</div>


and add in your css file

div.video{text-align: center;}


Then you can add more rules for all your videos in a single place (like margin, border, ...)

regards,
Axel
vlemieux replied on at Permalink Reply
Thanks a lot for your answer !
Best regards,
Vincent