Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After searching the net a while for fix of this issue I came up with nothing, I think I have tried everything and nothing solved my problem. Then driven by my logic I just wrapped the iframe of the embedded youtube video in one div set overflow: hidden; to this div and made it's height 2px smaller then the iframe height (on my video there was black border in the bottom). So the wrapper div is smaller then the iframe and with positioning it over the video you can hide the black borders you don't want. I think that this is the best solution from everything I have tried so far.</p> <p>From this example below try embedding just the iframe and you will see small black border at the bottom, and when you wrap the iframe in the div the border is gone, because the div is overlapping the iframe and it's smaller then the video, and it has overflow: hidden so everything that goes out of the div dimensions is hidden.</p> <pre><code>&lt;div id="video_cont" style="width: 560px; height: 313px; overflow: hidden;"&gt; &lt;iframe id="the-video" class="extplayer" width="560" height="315" src="https://www.youtube.com/embed/EErx017kDHQ?&amp;amp;autoplay=0&amp;amp;rel=0&amp;amp;fs=0&amp;amp;showinfo=0&amp;amp;controls=0&amp;amp;hd=1&amp;amp;wmode=transparent&amp;amp;version=2;yt:quality=high;" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt; &lt;/div&gt; </code></pre> <p>In my case the border was with about 2px height so I made the wrapper div 2px smaller in height to hide the border, in your scenario if the border is on the top of the video or on the sides and/or with different dimensions, you have to make different dimensions for the wrapper div and position it good so it overlaps the video where the borders are and with overflow:hidden; the borders are hidden.</p> <p>Hope this will help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload