I understand how it's done in Bootstrap4 but the same method isn't working in Bootstrap-vue
This is the code in my Homepage.vue file:
<template>
<div class="forVue">
<div>
<b-navbar toggleable="sm" type="dark" variant="dark">
<b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
<b-collapse id="nav-collapse" is-nav>
<b-navbar-nav class="mx-auto">
<b-nav-item href="/home">Home</b-nav-item>
<b-nav-item href="/home">Services</b-nav-item>
<b-nav-item href="/home">Contact</b-nav-item>
<b-nav-item href="/about">About Us</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
</div>
</div>
</template>
The following is my CSS inside style tags in the same file
<style>
.nav-item {
color: red !important;
}
</style>
This isn't working and the color remains the default. I also cannot understand how to specify the navbar to change the color of the whole navbar without using the !important tag. It works with the following code:
.navbar {
background-color: red !important;
}
How can I get that to work without the !important tag?