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: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

youtube responsive

Post 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%;
}
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Pablo
 
Posts: 21585
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo »

The built-in YouTube object is already responsive. There is no need for custom code.
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post 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
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz »

Anyone got any ideas

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

Cheers
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Pablo
 
Posts: 21585
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo »

The code normally goes between the head tags.
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz »

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

Cheers
The Cheapest Car Hire, Worldwide.

Summit Car Hire
User avatar
Pablo
 
Posts: 21585
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: youtube responsive

Post by Pablo »

It can be added via both.
User avatar
Billywiz
 
 
Posts: 162
Joined: Thu Jul 17, 2008 3:32 pm
Location: UK
Contact:

Re: youtube responsive

Post by Billywiz »

Thanks for that Pablo

Cheers
The Cheapest Car Hire, Worldwide.

Summit Car Hire
Post Reply