Updated on November 04, 2019
If you are using the built-in oEmbed feature of WordPress whereby pasting the URL of a YouTube video inserts the video in your post content, adding the following CSS will make the videos take up the full available width of your content with the videos proportionately sized i.e., behave responsively:
/* Make YouTube videos inserted via WordPress oEmbed full-width */
.wp-block-embed-youtube {
overflow: hidden;
position: relative;
max-width: 100%;
height: auto;
padding-bottom: 56.25%;
}
.wp-block-embed-youtube iframe,
.wp-block-embed-youtube object,
.wp-block-embed-youtube embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
An example can be seen here.
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.