Responsive Youtube Embed | Make YouTube Videos Responsive

.embed-youtube {
    position: relative;
    padding-bottom: 56.25%; /* - 16:9 aspect ratio (most common) */
    /* padding-bottom: 62.5%; - 16:10 aspect ratio */
    /* padding-bottom: 75%; - 4:3 aspect ratio */
    padding-top: 30px;
    height: 0;
    overflow: hidden;

.embed-youtube iframe,
.embed-youtube object,
.embed-youtube embed {
    border: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;


<div class="embed-youtube"><iframe title="YouTube video player" src="" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>

Related Posts

Creating a React Project: Step-by-Step Guide

Ready to dive into the world of React? Want to create your own React project from scratch? In this t...

Creating a Responsive YouTube Video iframe for Seamless Integration

Introduction: In the dynamic world of web development, creating a responsive design is crucial for p...

What is MySQL? A Comprehensive Guide

Have you ever wondered what MySQL, a source relational database management system, is and how it wor...

XAMPP – Error: MySQL shutdown unexpectedly

Generally there are four possible reason for XAMPP – Error: MySQL shutdown unexpectedly. 1. Sk...