youtube responsive

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
Billywiz
 
 
Posts: 110
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

youtube responsive

Post by Billywiz » Mon May 08, 2017 8:40 am

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%;
}
At last, website finished - - - - but wait !!!!

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo » Mon May 08, 2017 8:56 am

The built-in YouTube object is already responsive. There is no need for custom code.

User avatar
Billywiz
 
 
Posts: 110
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz » Mon May 08, 2017 9:31 am

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
At last, website finished - - - - but wait !!!!

User avatar
Billywiz
 
 
Posts: 110
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz » Thu May 11, 2017 1:43 pm

Anyone got any ideas

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

Cheers
At last, website finished - - - - but wait !!!!

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo » Thu May 11, 2017 2:22 pm

The code normally goes between the head tags.

User avatar
Billywiz
 
 
Posts: 110
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz » Thu May 11, 2017 5:07 pm

Thanks Pablo, is that the page html or inside an html object

Cheers
At last, website finished - - - - but wait !!!!

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo » Thu May 11, 2017 5:23 pm

It can be added via both.

User avatar
Billywiz
 
 
Posts: 110
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz » Thu May 11, 2017 9:14 pm

Thanks for that Pablo

Cheers
At last, website finished - - - - but wait !!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests