Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4 navbar-inverse doesn't have colour

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?

like image 619
svyatogor92 Avatar asked Sep 24 '17 08:09

svyatogor92


People also ask

How to change the color of navbar text in 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.

How to add navbar inverse BG-inverse in Bootstrap 4?

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.

How to create an inverted navbar with black background and white text?

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 −

What is the use of navbar-brand in Bootstrap?

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.


Video Answer


1 Answers

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.

like image 168
Asia x3 Avatar answered Sep 18 '22 01:09

Asia x3