By nuwantha , 24 July, 2017 Question How to set width of a youtube video automaticly ? Example : <div class="video-content"> <!-- YouTube video code--> <iframe width="560" height="349" src="http://www.youtube.com/embed/THEVIDEOID" frameborder="0" allowfullscreen></iframe> </div> .video-content { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0; iframe { position: absolute; height: 100%; top: 0; left: 0; width: 100% !important; height: 100% !important; } } Tags CSS Theming Add new comment Add CSS stylesheets to a module (CKEditor) Basic CSS Styling tips SASS SCSS LESS compile Comments1 You must have JavaScript enabled to use this form. Your name Subject Comment Text format Plain text Basic_html Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically. good hello Reply
Comments1
good
hello