paulirish / lite-youtube-embed

A faster youtube embed.
https://paulirish.github.io/lite-youtube-embed/
Other
5.6k stars 259 forks source link

How can I apply style="float: left" to the video? #135

Closed headerbidding closed 1 year ago

headerbidding commented 1 year ago

My previous iframe embed was within a <div style="float: left"> How can I add style="float: left" to lite-youtube-embed code, so I can add a floating <div> to the right of the video for a responsive layout?

If I add float: left; to the lite-youtube CSS. it won't work. The video disappears alltogether.

If I put a <div style="float: left"> around <lite-youtube videoid="DRrTujHaHis"></lite-youtube> the video also disappears.

I am not a very experienced coder. Can anyone help?

My test page is https://flixxy.com/trumpet-solo-melissa-venema-facade.htm

EDIT: I think I figured it out: Adding to the lite-youtube CSS. width: 100%; max-width: 945px; float: left; seems to work.