.bg-cover { position: relative; width:100%; height:60vh; } .bg-cover-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; } @media (min-width: 992px){ .bg-cover{ height:70vh; } }