.video-wrapper { max-width: 600px; /* Adjust this value to your desired maximum width */ margin: 0 auto; /* This will center the video container */ padding: 20px; /* Add some padding around the video */ box-sizing: border-box; /* Ensures padding is included in the width */ } /* To ensure the iframe inside is responsive and maintains aspect ratio */ .video-wrapper iframe { width: 100%; height: 315px; /* Adjust height as needed, or use aspect-ratio padding trick */ display: block; } .video-container { position: relative; width: 100%; max-width: 600px; margin: 0 auto; padding-bottom: 56.25%; /* 16:9 aspect ratio */ height: 0; overflow: hidden; background: #000; } .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }