Page 1 of 1

youtube responsive

Posted: Mon May 08, 2017 8:40 am
by Billywiz
I have a youtube video that I want to make responsive so I found the css code to do this, but where does it go.
I open an html object and put the code link to the youtube video into it, all is ok but to make it responsive I
need to add this code in a style sheet, where do I add this code - - - or is there an easier method within WYSIWYG

Cheers

Code: Select all

.video-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px; height: 0; overflow: hidden;
}
 
.video-container iframe,
.video-container object,
.video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

Re: youtube responsive

Posted: Mon May 08, 2017 8:56 am
by Pablo
The built-in YouTube object is already responsive. There is no need for custom code.

Re: youtube responsive

Posted: Mon May 08, 2017 9:31 am
by Billywiz
Thanks Pablo, cant see the trees for the wood sometimes, I've already used this feature before.

As a matter of interest, where would this code go?

Cheers

Re: youtube responsive

Posted: Thu May 11, 2017 1:43 pm
by Billywiz
Anyone got any ideas

"As a matter of interest, where would this code go"

Cheers

Re: youtube responsive

Posted: Thu May 11, 2017 2:22 pm
by Pablo
The code normally goes between the head tags.

Re: youtube responsive

Posted: Thu May 11, 2017 5:07 pm
by Billywiz
Thanks Pablo, is that the page html or inside an html object

Cheers

Re: youtube responsive

Posted: Thu May 11, 2017 5:23 pm
by Pablo
It can be added via both.

Re: youtube responsive

Posted: Thu May 11, 2017 9:14 pm
by Billywiz
Thanks for that Pablo

Cheers