I've been working on a Bootstrap menu design that features text on the left side and a video on the right. My goal is to make the video extend to the top of the page with a button overlaid, similar to the image I have in mind. However, I've encountered some challenges while trying to achieve this. Problems arose where the button was not accessible from the hamburger menu or positioning issues occurred due to interference from content on the right side. For further reference, I've provided a link to CodePen.
Desired Outcome:
https://i.sstatic.net/rarr1ekZ.png
.navbar-brand img {
max-width: 300px;
height: auto;
}
.nav-item a {
margin-right: 15px;
}
.btn-outline-success {
margin-left: auto;
}
.video-container {
position: relative;
width: 100%;
overflow: hidden;
}
.video-container video {
width: 100%;
height: auto;
}
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c0a2afafb4b3b4b2a1b080f5eef3eef3">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3e5c51514a4d4a4c5f4e7e0b100d100d">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
<!-- Logo -->
<a class="navbar-brand" href="#">
<img src="logo.png" alt="Logo" style="max-height: 50px;">
</a>
<!-- Hamburger Icon -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Navbar Links -->
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
</ul>
<button class="btn btn-outline-success" type="button">Contact</button>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="container-fluid">
<div class="row">
<!-- Left Content -->
<div class="col-lg-6 content">
<h3>left contect</h3>
<p>random text</p>
</div>
<!-- Right Content -->
<div class="col-lg-6 p-0">
<div class="video-container">
<video autoplay muted loop>
<source src="https://videos.pexels.com/video-files/6813964/6813964-hd_1080_1872_30fps.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
</div>
</body>