I would like to add 2 Youtube videos, side-by-side, into a page on my site. Is this even possible, first of all? Second, I think I have the working of the correct code (if it even is possible), but something is still not right as the second video shows an error.
The code I used was this:
<style>
*
{
box-sizing: border-box;
}
body {
margin: 0;
}
.image-container {
display: flex;
width: 100%;
}
.image {
width: 50%;
padding: 15px 15px;
}
.image img {
width: 100%;
}
@media(max-width: 767px) {
.image-container {
flex-direction: column;
align-items: center;
}
.image {
width: 100%;
}
}
</style>
<div class="image-container">
<div class="image image1">
<iframe width="560" height="315" src="https://www.youtube.com/embed/VZ6psJbTBJA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
</div>
<div class="image image2">
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=HfaBStJWK0s" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
</div>
</div>
Thank you very much!