featherlight icon indicating copy to clipboard operation
featherlight copied to clipboard

responsive youtube videos?

Open relipse opened this issue 8 years ago • 3 comments

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.

relipse avatar Mar 05 '16 17:03 relipse

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%.

lplohmann avatar Apr 05 '16 19:04 lplohmann

Duplicate of #188

robneu avatar Apr 05 '16 20:04 robneu

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!

niente0 avatar Dec 16 '20 14:12 niente0