Support Forums for LiveMesh Themes & Plugins › Forums › Appdev Theme Support › Resize embedded Youtube videos
- This topic has 8 replies, 2 voices, and was last updated 8 years, 3 months ago by Zetland.
-
AuthorPosts
-
June 11, 2016 at 9:10 am #22473ZetlandParticipant
Hello again,
I’m having an issue when it comes to embedding Youtube videos. When I use Youtube’s own query string to make the video smaller, it still appears in as big a size as possible.
I’ve tried a few things to fix this – adding a div container and then setting that to a particular size, adding a class to the iframe with a max width attached – but these either don’t work or chop the video in half, rather than resizing it to a half of what it was.
Could you show me how to fix this?
Thanks
June 11, 2016 at 10:04 am #22475ZetlandParticipantYou can see the issue here: http://vocularapp.com/faq/
June 13, 2016 at 5:32 am #22491VeenaModeratorPls try the below custom CSS in themeoptions –
.fluid-width-video-wrapper iframe.vocularVideo { max-width: 600px; max-height: 400px; }
June 16, 2016 at 8:52 am #22610ZetlandParticipantThanks! I’m also trying to center align the video but can’t seem to get it to work. I’ve tried
align: center
,margin: auto
,display: block
,align: middle
, but none of these do anything with the iframe. Can you let me know how I should be doing this?June 16, 2016 at 9:23 am #22614ZetlandParticipantCan you also show me how to change the style of
.fluid-width-video-wrapper
so that it’spadding-top: 40%;
instead ofpadding-top: 50%
?June 17, 2016 at 5:19 am #22645VeenaModeratorCan you pls check this tutorial –
https://premium.wpmudev.org/blog/how-to-center-a-video-in-wordpress/2. Pls use the below custom CSS –
.faq .fluid-width-video-wrapper { padding-top: 40% !important; }
If you simply give the below css without mentioning the specific div class/id (faq) ll affect the entire video-wrapper that you would use in other pages . So here we ensure that we are restricting the padding-top to only for the videos in faq section.
.fluid-width-video-wrapper {
padding-top: 40% !important;
}June 17, 2016 at 4:49 pm #22669ZetlandParticipantThanks for your help here. I had tried that method already though and it hasn’t made a difference. I’ve added it again so you can see for yourself: http://vocularapp.com/faq/
Is there something which is overriding any attempt at alignment that I try? Everything I’ve done so far has kept it left-aligned…
James
June 20, 2016 at 7:44 am #22704VeenaModeratorCan you try the below custom CSS and see if it helps ..
Not sure how well it works –
Pls modify to below custom CSS –.page-id-11 .fluid-width-video-wrapper { padding-top: 0 !important; } .page-id-11 .fluid-width-video-wrapper iframe.vocularVideo { max-width: 700px; height: 450px; position: relative; }
June 26, 2016 at 1:36 pm #22839ZetlandParticipantYou’ve done it! Thank you very much.
James
-
AuthorPosts
- The topic ‘Resize embedded Youtube videos’ is closed to new replies.