Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vimeo embed black bit at top and bottom #11

Closed
makingthingswork opened this issue Oct 30, 2013 · 6 comments
Closed

Vimeo embed black bit at top and bottom #11

makingthingswork opened this issue Oct 30, 2013 · 6 comments

Comments

@makingthingswork
Copy link

Anyone know why the black bar appears at the top and bottom of a Vimeo embed?

My container div hasn't been resized yet and the initial size is set to the same aspect ratio as the share embed code when I set the width to 620px eg. 620px x 378px

Is it possible to remove this?

screen shot 2013-10-30 at 15 14 52

@Buzejka
Copy link

Buzejka commented Jan 1, 2014

I don't know if this "the right way" of doing something like this, but I found this useful, when I had the same problem.
I'm using Bootstrap and have the wrapper and iframe in a span8 div. This ensures the video also acts responsively.

.video-wrapper {
position: relative;
padding-bottom: 54.1%;
padding-top: 2.2%;
height: 0;
}
.video-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

When resizing the window, the black bars reappear (though vertical), so I've changed the % to

@media (max-width: 767px) {
.video-wrapper {
position: relative;
padding-bottom: 54.15%;
padding-top: 2.4%;
height: 0;
}
}

I hope this helps

@jeffehobbs
Copy link
Owner

@Buzejka's solution is pretty good -- seems like either way you're going to get letterboxing or pillarboxing (the bars on the sides). I'll look into the possibility that the Vimeo player's aspect ratio might have changed slightly.

@gripestam
Copy link

I got it working just fine after removing "padding-top: 30px;" from .embed-container {}

@jeffski
Copy link

jeffski commented May 21, 2014

Removing padding-top: 30px works for me too.

@mvanroon
Copy link

^ this

@jeffehobbs
Copy link
Owner

Sounds like it's time to remove the IE6 workaround. "padding-top:30px" has been removed for all responsive embed wrappers. Thanks, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants