I'm having trouble centering a YouTube embedded video on my Bootstrap page. The video size is always the same.
My html code is simple:
<div class="video">
<iframe width="560" height="315" src="https://www.youtube.com/embed/ig3qHRVZRvM" frameborder="0" allowfullscreen=""></iframe>
</div>
I've tried various solutions from stackoverflow, but they only address centering a div, not a video. The best result I could achieve was with this fiddle.
I attempted solution1, solution2, and solution3 without success. Another somewhat successful solution was using:
width: 50%;
margin: 0 auto;
While this worked on desktop, it failed on iPad or phone as the video extended beyond the screen. How can I properly center the video on desktop, tablet, and phone?