Shape 5

Joomla Templates => Corpway - Club => : angour July 03, 2014, 06:07:40 PM



: Responsive videos - div with a class "s5_video_container"
: angour July 03, 2014, 06:07:40 PM
Hi guys,

could you please give a bit more detailed example of how to wrap videos in a div with a class. I found this information about the template but unfortunately no practical example:

"Make any Youtube, Vimeo, etc video you embed to your site work with responsive by wrapping with a DIV with a class of "s5_video_container"."

If you could spell out an example with a Youtube video, it would be much appreciated

thanks!


: Re: Responsive videos - div with a class "s5_video_container"
: mikenicoll July 03, 2014, 08:02:35 PM
Hello,

Here is an example of how you can implement this

<div class="s5_video_container">
<iframe width="300" height="215" src="//www.youtube.com/embed/DGRz2BJQRXU" frameborder="0" allowfullscreen></iframe>
</div>

-Mike


: Re: Responsive videos - div with a class "s5_video_container"
: angour July 04, 2014, 04:01:23 AM
Super, thanks for the quick reply, I will try this  :)


: Re: Responsive videos - div with a class "s5_video_container"
: angour July 04, 2014, 08:12:58 AM
I tried pasting this as an example right into one of the website pages and unfortunately it did not work, nothing would appear. Hoever i had some success with this:

<div class="s5_video_container">
      <span style="text-align: center;">{youtube}gmy6lX08xuo<span style="text-align: center;">|512|288{/youtube}</span></span></div>

it does make the video responsive, however, for some reason it stretches it all the way to 100% of the width, even though we specified  the |512|288 resolution, which is roughly 75% of the space I think. Is there a way to limit the size of the video on the page when using this div class ""s5_video_container"

you can see the video here *first from the top) : http://ams8.siteground.eu/~carame97/upgrade/salsa-training-performance-team-group

many thanks!


: Re: Responsive videos - div with a class "s5_video_container"
: mikenicoll July 05, 2014, 12:12:09 AM
Hello,

Try entering the code with the Editor set to None and also ensure Super User - Text Filtering is disabled. The width of the video before clicking is based on the container width. So if you have it published in the Top Row 1 and your Layout > Top Row 1 settings in the Template Manager were set to 50% + 50% with 2 modules it would split the video in half instead of the full page.

If you leave the Top Row 1 settings to automatic and only have 1 module in the row then it will span the entire page as that is how responsive works.

-Mike