Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From https://themeskills.com/make-embedded-youtube-videos-responsive-wordpress/
- Get the iframe embed code, and paste it within the following div.
- <div class="youtube-responsive-container"><iframe ...></iframe></div>
- add the following CSS to the site:
- .youtube-responsive-container {
- position:relative;
- padding-bottom:56.25%;
- padding-top:30px;
- height:0;
- overflow:hidden;
- }
- .youtube-responsive-container iframe, .youtube-responsive-container object, .youtube-responsive-container embed {
- position:absolute;
- top:0;
- left:0;
- width:100%;
- height:100%;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement