Home › Forums › Support › How to "float a YouTube" embed video into a post? This topic has 5 replies, 2 voices, and was last updated 2 years, 11 months ago by Leo. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts February 25, 2020 at 6:23 am #1176191 Henry Thanks for helping. OK, I’d like to “float” a YouTube embedded video into a generic vanilla GeneratePress Post. I know that I just need to paste in the iframe but that makes the image full width. Is there a way to maximise the width of the video so that on desktop view it doesn’t stretch the entire width of the page which can look a bit ugly. Perhaps I am overcomplicating this – not sure, but I thought I’d ask anyway. Thanks! February 25, 2020 at 10:39 am #1176617 LeoStaff Customer Support Hi there, Have you tried the YouTube embed blocks? Then you can use the alignment options: https://www.screencast.com/t/OzOfcYei4L2j Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ February 25, 2020 at 5:10 pm #1176902 Henry Thanks Leo, in fact we had to disable Gutenberg b/c of some customization. I fixed it like this: <div style="text-align:center"> <iframe width="560" height="315" src="https://www.youtube.com/embed/jmXJNyXq1yU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> Do you think that’s a good approach? T February 25, 2020 at 5:14 pm #1176903 LeoStaff Customer Support Nothing wrong with that if works for you ๐ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ February 25, 2020 at 5:36 pm #1176915 Henry Thanks! February 25, 2020 at 9:26 pm #1176988 LeoStaff Customer Support No problem ๐ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In