Good evening everyone,
Recently, I've been experimenting with Bootstrap 4 to create a simple Navbar. I encountered an issue where I attempted to adjust the font-size and color (or hover color) in the Navbar. Strangely, the font-size adjustments seem to take effect, but the color changes do not. Additionally, I'm struggling to add extra padding between each item. My understanding was that by including a custom CSS file after Bootstrap 4, I could easily override styles. (This is all part of a course I'm currently enrolled in, so please disregard the Halo Topic)
main {
color: brown;
padding: 50px;
height: 1200px;
}
#Wallpaper {
height: 220px;
width: 100%;
}
#sticky-footer {
height: 60px;
}
nav ul li a {
font-size: 17px;
color: brown;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Master Chief</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="WebsiteCSS.css">
</head>
<body>
<img id="Wallpaper" src="/Website/Images/HomeWallpaper.png" alt="Halo Wallpaper">
<nav class="navbar navbar-expand-sm bg-dark navbar-dark sticky-top">
<!-- Masterchief Logo -->
<a class="navbar-brand" href="#">
<img src="/Website/Images/Logo.png" alt="Halo Logo" style="width:40px;">
</a>
<!-- Links -->
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Halo</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Handlung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Fraktionen</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Master Chief</a>
</li>
<!-- Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
Spielreihe
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Halo</a>
<a class="dropdown-item" href="#">Halo 2</a>
<a class="dropdown-item" href="#">Halo 3</a>
<a class="dropdown-item" href="#">Halo Wars</a>
<a class="dropdown-item" href="#">Halo Reach</a>
<a class="dropdown-item" href="#">Halo 4</a>
<a class="dropdown-item" href="#">Halo 5: Guardians</a>
</div>
</li>
</ul>
</nav>
<main>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Id odio reiciendis consectetur architecto cumque? Iste reprehenderit magni dicta ex iusto officia ducimus dolorum? Consequuntur esse numquam, illum sit sapiente officiis?
</main>
<footer id="sticky-footer" class="py-3 bg-dark text-white-50">
<div class="container text-center">
<small>Copyright © Master Chief</small>
</div>
</footer>
</body>
</html>