I would like for my website to have three equally sized videos side by side with about 40px of padding between each video. I would also like there to be a caption space underneath in order to have a short description of the video. I am hoping for it to look something like this:
I also would like the videos to expand so that there is a column of the three videos and captions if the screen cannot fit all three of the videos in one line. I also would like to make sure that the videos do not have black lines on the side when playing due to resizing issues but I am not sure if that is possible.
Currently I am able to embed the videos but they are placed under each other in a sort of column. The padding does not work and I am not sure what to do.
My code is below:
<!DOCTYPE html>
<html>
<link href="https://fonts.googleapis.com/css2?family=Flamenco:wght@300&display=swap" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css">
<title>
Title
</title>
<head>
<header>
<div class="container">
<img src="logo.png" alt = "logo" class = "logo" width="150" height="50">
</div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Video Archive</a></li>
<li><a href="#">Text Archive</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
</header>
</head>
<body>
<div class="title">
<h1 style="color:rgb(0, 0, 0)">Title</h1>
<h2 style="color:#222"> Hook </h2>
</div>
<div class="featured">
<h3 style="color:#ffffff">
Featured Videos:
</h3>
<br><br>
<div id="videos">
<p>
<iframe class="video1" width="33%-40" height="350" src="https://www.youtube.com/embed/c74kMCOmP80" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<div class="caption">Caption 1</div>
<iframe class="video1" width="33%-40" height="350" src="https://www.youtube.com/embed/c74kMCOmP80" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<div class="caption">Caption 2</div>
<iframe class="video1" width="33%-40" height="350" src="https://www.youtube.com/embed/c74kMCOmP80" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<div class="caption">Caption 3</div>
</p>
</div>
<h3 style="color:#ffffff">
Featured Blog Posts
</h3>
<br><br>
</div>
My CSS code is below:
body {
margin: 0;
background: rgb(255, 255, 255);
font-family: 'Flamenco', cursive;
font-weight: 900;
}
header {
background: #ffffff
}
h1 {
text-align:center;
padding-top: 100px;
}
h2 {
text-align: center;
padding-top: 15px;
padding-bottom: 40px;
}
.title {
background-color: rgb(255, 255, 255);
}
.featured{
background-color: #222;
padding-top: 5px;
padding-left: 5px;
padding-right: 5px;
font-size: 18;
padding-bottom: 500px;
}
header::after{
content:'';
display:table;
clear: both;
}
.logo{
float:left;
padding: 0px 0;
}
nav{
float: left;
}
#images p{
margin:0px 20px;
display:inline-block;
text-decoration:none;
color:black;
}
nav ul{
margin: 0;
padding: 0;
list-style: none;
}
nav li {
display: inline-block;
margin-left: 70px;
padding-top: 15px;
position: relative;
}
nav a {
color: #444;
text-decoration: none;
font-size: 18px;
}
nav a:hover{
color: rgb(20, 20, 38);
}
nav a::before{
content: '';
display: block;
height: 5px;
background-color: #444;
position: absolute;
top:0;
width: 0%;
transition: all ease-in-out 250ms;
}
nav a:hover::before{
width: 100%;
}
</body>
</html>