Can someone assist me with a design issue I'm facing? I have two divs within a section. The left div contains a heading and a button, while the right div contains a video. However, when I try to add a background image to the video using CSS in the wrapper class, I encounter problems with the dimensions of the background image. My goal is for the video to be centered within the background image. Any suggestions on how to achieve this?
.container {
width: 100%;
margin-top: 20px;
}
.paragrah-desktop {
display: flex;
}
.wrapper {
border: 2px solid black;
background: url(/static/imgs/bg_video.png);
//Dimension is 1920*1080
background-size: contain;
background-repeat: no-repeat;
width: 100%;
height: 0;
}
video {
position: absolute;
width: 80%;
border: 2px solid #7cd959;
}
<section class="container" id="header">
<div class="paragrah-desktop">
<div class="subheader">
<h1 class="desktop-title">UPGRADE ALERTS</b></h1>
<button type="button" class="btn" data-toggle="modal" data-target="#exampleModal">Join
</button>
<p class="header-p">Coming to you July 2023</p>
</div>
<div class="wrapper">
<!-- <video controls>
<source src="{% static 'imgs/mobile_video.webm' %}" type="video/webm">
</video> -->
</div>
</div>
</section>