I am currently working on positioning text and a button over an HTML5 video without using media queries to address mobile display issues. The problem arises when using the car-image-overlay class from Bootstrap 4 to show the div containing the text over the video. Despite trying various Bootstrap 4 classes for alignment, such as centering and left aligning, the layout breaks on mobile devices like the iPhone 5e. The button, h1, and p elements do not adjust, causing them to cover the entire video and go out of frame. I initially expected Bootstrap to handle this seamlessly, but it appears I may be implementing it incorrectly. I have tried utilizing col-lg and xs classes, but to no avail.
https://i.sstatic.net/YP0O9.jpg
.cta-video-section .cta-video-container {
position: relative;
}
.cta-video-section .cta-video-container video {
height: auto;
vertical-align: middle;
width: 100%;
}
.cta-video-section .cta-video-container h2 {
color: white;
}
.cta-video-section .cta-video-container p {
color: white;
font-family: "Open Sans", sans-serif;
font-size: 1.1rem;
}
.cta-video-section .cta-video-container button {
white-space: normal;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="cta-video-section">
<div class="cta-video-container">
<video id="cta-video" autoplay loop muted>
<source src="http://www.icutpeople.com/wp-content/themes/icutpeople/assets/video/waynesworld.mp4" type="video/mp4"> Your
browser does not support the video tag.
</video>
<div class="card-img-overlay d-flex align-items-center" id="cta-video-texts">
<div class="row">
<div class="text-left col-xs-1 col-lg-4 ">
<h2 class="card-title ">H2 Locations Headline</h2>
<p class="card-text ">This is a wider card with supporting text below as a natural lead-in to additional
content. This content is a little bit longer.</p>
<div class="">
<button class="btn btn-danger btn-lg " id="cta-video-button">
Watch Video CTA
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>