Hello! I’m trying to incorporate Bootstrap into my personal project and my nav bar is being cut off at the top and haven’t been able to pinpoint the reason why. Any help would be greatly appreciated as I would really like to use bootstrap to create this page.
Here is my HTML and CSS:
<body>
<nav class="navbar navbar-custom navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="#">Blog</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
</div>
</nav>
<video autoplay muted loop id="myVideo" class="center">
<source src="Videos/asweareFINAL!!.mp4" type="video/mp4">
</video>
<!-- Optional: some overlay text to describe the video -->
<script src="" async defer></script>
</body>
</html>
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Hello! Can someone help me figure out how to align my nav bar closer to the left end of the page? I’ve tried using “display: flex” and “justify-content: flex-start” and “position” but both seem to mess with the nav bar positioning on the page.