Youtube embed size, revisited


(Bart) #1

I’m following up on ‘Youtube embed size’. In this topic, the discussion was about the small default size of YouTube embeds. The final solution was allowing width and height parameters in YouTube links. I’m not sure this is a great solution as most forum users will not know about these.

What’s currently the best approach to make YouTube embeds the same size as images?

Somewhat on the same topic, Vimeo embeds are larger than YouTube embeds but still not the same size as images.


(Brendan Schlagel) #2

This is what we have currently to make YouTube embeds span the full post width:

.lazyYT-container {
    height: 0 !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
}

IMO this is a big improvement and something like this should just be the default styling!

Not sure how to do the same for Vimeo (but YouTube accounts for probably like 99% of videos shared on our forum so not something we’ve worried about too much…)


Making embedded (linked) video stretch to the edges of the topic
(Bart) #3

Brilliant, thanks!

True enough :slight_smile:


#4

this looks perfect, thank you so much!