This is my first post. I apologise if the question is very basic. I can't seem to find a resolution to this problem. I am trying to center a Vimeo video IFrame perfectly within a simple black border. The video fits the border height wise but there are white spaces to both the left and the right within the border. I have attached an image. The video is behaving as it should in responsive terms.
I am using Bootstrap and my code is as follows:
HTML
<div class="vimvid">
<div class="container">
<iframe src="https://player.vimeo.com/video/289437293?portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> </iframe>
</div>
</div>
CSS
.vimvid { padding: 56.25% 0 0 0; position:relative; }
.vimvid iframe { position:absolute; top:0; left:0; width:100%; height: 100%; border: 25px solid #000000; border-radius: 25px; }
I am trying to center a Vimeo video IFrame perfectly within a simple black border. The video fits the border height wise but there are white spaces to both the left and the right within the border. The video is behaving as it should in responsive terms.
I am using Bootstrap and my code is as follows:
HTML
<div class="vimvid">
<div class="container">
<iframe src="https://player.vimeo.com/video/289437293?portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> </iframe>
</div>
</div>
CSS
.vimvid { padding: 56.25% 0% 0% 0%; position:relative; }
.vimvid iframe { position:absolute; top:0; left:0; width:100%; height: 100%; border: 25px solid #000000; border-radius: 25px; }
I want the video to be displayed perfectly centrally within the border without there being white spaces to the left and to the right. How do I achieve this? Thanks in advance for any advice.