I recently published my website to the internet, and my Brother-In-Law, (who used to work in web development) suggested that I use bootstrap, so I decided that I would go and research bootstrap and then implement it into my website. Everything has been going fine so far, but I have run into a problem with my navigation bar, I want it centered like it is in this picture:
How I want it to look like
Here’s a pic of how it currently looks:
How it currently looks like
How would I do this?
Here’s my code:
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="CSS/All.css">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>Keenon's Projects Homepage</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="text-center">Keenon's Projects</h1>
</div>
<nav class="navbar navbar-default">
<div class="container">
<!-- Menu Items -->
<div id="bar">
<ul class="navbar-nav">
<li id="home" class="nav-item"><a href="#" class="nav-link">Home</a></li>
<li id="projects" class="nav-item"><a href="Projects.html" class="nav-link">Projects</a></li>
<li id="certs" class="nav-item"><a href="Certs.html" class="nav-link">Certifications</a></li>
</ul>
</div>
</div>
</nav>
<div id="aboutPara">
<h2>About this site</h2>
<p class="para">
Hello my name is Keenon,<br> I made this website for the sole purpose of displaying all my completed projects that I have made and some that I haven't completed yet.<br> This isn't a very fancy site and it doesn't need to be,<br> I just need a place(other than Github) to display my projects.<br>Enjoy.
</p>
</div>
<div id="contactPara">
<h2>Contact Info</h2>
<p class="para">Here are some links to websites that I am on:<br> <a href="https://github.com/Keenonthedaywalker?tab=repositories" id="git">Github</a><br> <a href="https://www.instagram.com/keenonthedaywalker/">Instagram</a><br> <a href=""></a></p>
</div>
</div>
</div>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
</body>
</html>
and CSS:
body {
text-align: center;
background-image: url('mainpageBackground.png');
}
h1 {
color: rgb(0, 200, 200);
font-size: 100px;
}
li {
color: rgb(0, 200, 200);
list-style-type: none;
font-size: 30px;
font-family: monospace;
}
#bar .navbar-nav {
float: none;
text-align: center;
}
#bar .navbar-nav > li {
display: inline;
float: none;
}
#bar .navbar-nav > li > a {
display: inline;
}
a:visited {
color: rgb(200, 200, 200);
}
a:link {
color: rgb(200, 200, 200);
}
#aboutPara {
margin-top: 150px;
}
.para {
color: white;
}
h2 {
color: rgb(0, 200, 200);
font-size: 40px;
margin-top: 30px;
text-decoration: underline;
}
#git {
padding-top: 40px;
}
#projectsPara {
margin-top: 100px;
}
#vbwc {
width: 70%;
height: 100%;
margin-top: 50px;
}
#die {
width: 50%;
height: 50%;
}
#vpp {
width: 50%;
height: 50%;
}
p {
font-size: 20px;
font-family: roboto, monospace;
}
h3 {
color: rgb(0, 200, 200);
font-size: 35px;
margin-top: 30px;
text-decoration: underline;
}
.certLinks {
display: list-item;
}