Fiddle: http://jsfiddle.net/dbwvx42s
Description of Issue: I'm using Bootstrap to make some columns within a section. The section has zero height (e.g. height: 0
) but 56.25% bottom padding in order to maintain the aspect ratio (16:9) of the other content on the page.
The problem I'm running into is how to vertically center the content within this zero-height, padded element. I've attempted a flexbox solution to no avail. I've tried inline-blocking the content and using vertical-align, which was also a no-go. I'm running out of tricks!
Any help appreciated.
Code:
#section-1 {
background-color: #0099cc;
color: #fff;
height: 0;
padding-bottom: 56.25%;
}