Recently I decided to try new bootstrap version (4). I did everything right with files (my html below)
<!DOCTYPE html>
<html lang="pl">
<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>Bootstrap 4 website</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav class="navbar navbar-inverse">
<a href="#">Link1</a>
</nav>
<!-- JS scripts here -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>
but my navbar (navbar-inverse) has no colour. Have You ever seen something similar with Bootstrap 4?
In Bootstrap 4 you want to change the background class the nav tag (.bg-light or .bg-dark). Next you can use navbar-dark to change the color of the text to fit the darker contrast. Show activity on this post. Navbar-inverse have property by default.
Bootstrap 4 doesn't have css classes navbar-inverse bg-inverse. You need to use combination of navbar-light bg-light or navbar-dark bg-dark with nav component. For example: Show activity on this post.
To create an inverted navbar with a black background and with white text, simply add the .navbar-inverse class to the .navbar class. You can try to run the following code to implement navbar-inverse class −
The .navbar-brand class is used to highlight the brand/logo/project name of your page: ... When using the .navbar-brand class on images, Bootstrap 4 will automatically style the image to fit the navbar vertically.
In Bootstrap 4 you want to change the background class the nav tag (.bg-light or .bg-dark).
<nav class="navbar navbar-expand-md bg-dark">
Next you can use navbar-dark
to change the color of the text to fit the darker contrast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With