featherlight
featherlight copied to clipboard
responsive youtube videos?
Hello, I'm trying to embed youtube videos and I used data-featherlight="<iframe...." but for some reason it shows at a huge width, with a smaller browser it gets cut off. Any ideas.
Same happened to me. In my case, .featherlight-content margins were set to 10% (.featherlight .featherlight-content, margins are declared at line 61), but its width to 90% (.featherlight-iframe .featherlight-content, width declared at line 125). You should adjust one or another so they add up to 100%.
Duplicate of #188
I solved my responsive video issue with this css:
.featherlight-content { max-width: 1024px; max-height: 576px !important; width: 96vw; height: 54vw; /* NOTE: vw instead of vh */ }
IFRAME.featherlight-inner { width:100%; height:100%; max-width: 1024px; max-height: 576px; }
Remember to remove any data-featherlight-iframe-width and data-featherlight-iframe-height attributes from the A tag!
Cheers!