How to Embed YouTube Responsively on Blogger
Remember, you have to use the address provided when you click underneath the video under "share" and "embed" instead of the address on this one.
Add these styles:
<style>
.video_outer_wrap {
width: 100%;
max-width: 560px;
margin: 15px auto;
}
.video_wrap {
position: relative;
padding-bottom: 56%;
padding-top: 0px;
height: 0;
background-color: #000 !important;
}
.video_wrap iframe,
.video_wrap object,
.video_wrap embed {
position:absolute;
top:0;
width:100%;
height:100%;
}
</style>
And put your YouTube video address in this:
<div class="video_outer_wrap">
<div class="video_wrap bottomshadows">
<iframe width="560" height="315" src="____YouTube_video_address____" frameborder="0" allowfullscreen></iframe> </div>
</div>
Source: http://www.twistblogger.com/2015/08/how-to-make-embedded-videos-responsive-and-display-inside-frame.html
<style>
.video_outer_wrap {
width: 100%;
max-width: 560px;
margin: 15px auto;
}
.video_wrap {
position: relative;
padding-bottom: 56%;
padding-top: 0px;
height: 0;
background-color: #000 !important;
}
.video_wrap iframe,
.video_wrap object,
.video_wrap embed {
position:absolute;
top:0;
width:100%;
height:100%;
}
</style>
And put your YouTube video address in this:
<div class="video_outer_wrap">
<div class="video_wrap bottomshadows">
<iframe width="560" height="315" src="____YouTube_video_address____" frameborder="0" allowfullscreen></iframe> </div>
</div>
Source: http://www.twistblogger.com/2015/08/how-to-make-embedded-videos-responsive-and-display-inside-frame.html
Comments
Post a Comment