Recently, I delved into Bootstrap and attempted to execute a code for a navbar
with a video background.
This is what my attempt looked like:
HTML Code:
<html>
<head>
<title>Medical</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
// more script tags...
</head>
<body>
<section class="section-header">
<div class="container">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
// more navbar elements...
</nav>
</div>
</div>
</div>
</section>
// more HTML structure...
</body>
</html>
I imported the CSS file (wstyle.css) from the CSS folder and the video (video.mp4) from the video folder.
The CSS code in wstyle.css looks as follows:
CSS (wstyle.css)
.video-bg{
position:fixed;
z-index: -1;
}
However, I noticed that the video was displaying differently on Internet Explorer and Google Chrome. Additionally, the video was not functioning as the background for the navbar. How can I resolve this issue?