How to make youtube & Vimeo videos fit in css grid?

Hi, Guys this tutorial we are going to learn about how we can fix the different height and width videos in the grid. I have place some CSS code below please take a look.

//Add the following CSS to your code

.iframe-container{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; 
  height: 0;
}
.iframe-container iframe{
  position: absolute;
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
}