Learn How To Make Responsive Youtube Embed in Blogger
Code to paste right above </head>
<script src='//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js' type='text/javascript'></script>
<script>
$('.BLOG_video_class').ready(function(){
$('.BLOG_video_class').parent().css({
'position': 'relative',
'padding-bottom': '56.25%',
'height': '0',
'clear': 'both',
'text-align': 'center',
'margin': '20px 0'
});
$('.BLOG_video_class').css({
'position': 'absolute',
'top': '0',
'left': '0',
'width': '100%',
'height': '100%',
});
});
</script>
If it doesn't work then Replace every occurrence of...
".BLOG_video_class" with ".YOUTUBE-iframe-video"
No comments:
Post a Comment