Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Responsive videos

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi,

I am adding iframes with the <div class="video-container">
<div class="zenvideo"> method.

Is there a way for some videos (not all) to be half the size and also be responsive?

Basically i want the trailer on the page venetiaz.com/excercises/physical-excersice.html to be approximately half the size it is now.

Thanks in advance
Evyenia
  • Evyenia's Avatar
  • Evyenia
  • 12 Month basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Evyenia,

Can I just check is this what you want to look smaller?

video-size.jpg
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
As for me it looks quite good at this size

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi yes thats the video i want smaller - i agree with you 100% but my client wants if apx half the size and center aligned...

Is it possible?

Thanks
Evyenia
  • Evyenia's Avatar
  • Evyenia
  • 12 Month basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Evyenia,

Can you paste the snippet in a text file and attach it here

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
As I think I will have to try it myself on my machine to test

Cheers
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Good morning Paul

Here is the css code in custom.css

/* Video Elements
*/
video {
width:100% !important;
height:auto!important
}

.sizer {
width: 200px;
}

.video-container {
position:relative;
padding-bottom:56.25%;
padding-top:0;
height:0;
overflow:hidden
}

.video-container iframe,.video-container object,.video-container embed {
position:absolute;
top:0;
left:0;
width:100%;
height:94%;
}

and this is what i put in the article

<div class="video-container">
<div class="zenvideo" style="text-align: justify;"><iframe src="www.youtube.com/embed/gt-NvbpAO5A?showinfo=0" width="100%" height="auto" allowfullscreen="allowfullscreen"></iframe></div>
</div>

i tried changing the video size from the css to 50% but then of course it changed the size of the videos throughout the site... Anything else i tried had no effect what so ever.

Thanks sooo much for looking into this for me!
Evyenia
  • Evyenia's Avatar
  • Evyenia
  • 12 Month basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Right so I'm using the allvideos plugin combined with some divs from the template / JB type syntax

I'm wrapping the code in a video class so you have flexibility to adjust the divs using media queries
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
My code is attached

I can't paste it as it will be stripped

As you can see i've used the allvideos tag together with the youtube unique video identifier
Attachments:
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
So essentially its faking being centered with two grids either side of the video

These grid two collapse on mobile which does add space above and below the video

but you could address this via a media query

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Thanks so much Paul!

Have a great day!!!
  • Evyenia's Avatar
  • Evyenia
  • 12 Month basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Paul again thank you so much it has worked beautifully!!!
  • Evyenia's Avatar
  • Evyenia
  • 12 Month basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
No problem

Best of luck with the site

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers