I want to fit a YouTube iframe embed in the middle of a page (70% width) so I'm doing this:
.wrapper {
margin: auto;
width: 70%;
}
.wrapper iframe {
left: 0;
top: 0;
width: 100%;
height: 100%;
}
The problem is, I'm getting black bars around the video to fill the available space. If instead I used padding (as in this answer) the iframe would only fit horizontally and might require scrolling in the vertical direction. Any idea what might help? (older browser support is not an issue)
Edit: I know the aspect ratio of the video I want to play.