.vid1 { object-fit: cover; position: absolute; top: 0; left: 0; height: 100%; width: 100%; } .vid2 { object-fit: cover; position: absolute; top: 0; left: 0; height: 100%; width: 100%; } .video-wrapper1 { width: 40vw; height: 100vh; position: relative; overflow: hidden; text-align: center; display: flex; align-items: center; justify-content: center; } .video-wrapper2 { width: 40vw; height: 100vh; position: relative; overflow: hidden; text-align: center; display: flex; align-items: center; justify-content: center; } .header1{ position: relative; color: white; text-shadow: 1px 1px 8px rgba(0,0,0,0.6); } .header2{ position: relative; color: white; text-shadow: 1px 1px 8px rgba(0,0,0,0.6); } .grid_container { display: grid; grid-template-columns: auto auto; } .item1 { width: 40 vw; height: 100 vh; } .item2 { width: 40 vw; height: 100 vh; } @media screen and (max-width: 768px) { .grid_container { grid-template-columns: auto; display: grid; } .item1 { width: 90 vw; } .item2 { width: 90 vw; } }