Make YouTube Respond

It took some experimenting but this was the code that I used to get Youtube videos to respond to different screen sizes in Moodle using inline styles.

<EXAMPLE: div style=”background-color:black;color:white;padding:20px; position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;”>

<EXAMPLE: iframe src=”; frameborder=”0″ allowfullscreen=”” style=”position: absolute; top: 0; left: 0; width: 100%; height: 100%;”></iframe>


I found these sites to be helpful in figuring this out. The first link provided the HTML and CSS codes. The other three links explain how to create an inline styles for a DIV and iFrame.

Inline style:




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s