-
AuthorPosts
-
February 9, 2015 at 5:30 pm #202673
I’ve tried and failed to embed a vimeo video so it stops from scaling the full width of the site but is still aligned in the centre.
I got close but no cigar. It’s scaled down inside a container (though I ca see the borders of the container… which i don’t like)
I originally tried using normal X setup with video embed shortcodes placed inside a container…
and then used:Example, add this css at your customizer’s custom css.
.video-size-500-300 {
max-width: 500px;
display:block;
float:none;
}
.video-size-500-300 .x-responsive-video-inner{
padding-bottom:0;
height: 300px;
}Now, what you need to do is add video-size-500-300 at your video shortcode anytime you want.
Eg.
[x_video_embed class=”video-size-500-300″]<iframe src=”http://player.vimeo.com/video/67051688″ width=”500″ height=”281″ frameborder=”0″ webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>[/x_video_embed]Which worked well enough but I could never stop the container from being left aligned.
I also tried with the visual composer… but keep getting stuck along a similar line…
February 9, 2015 at 5:37 pm #202674Success…
Had to add <center> before and </centre> after the video embed.
Oh and make sure I spelt centre the preferred american way rather than the english way of centre.
Also the addition of no_container=”true” , got rid of the visual container border.
Happy days… its a small victory…
<center>[x_video_embed type=”16:9″ no_container=”true” class=”video-size-500-300″]<iframe src=”//player.vimeo.com/video/118648047?color=ffffff&title=0&byline=0&portrait=0″ width=”500″ height=”281″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>[/x_video_embed]</center>
February 10, 2015 at 3:40 am #202942That’s Great & Cheers!
-
AuthorPosts