Hi all,
I’m attempting my first bootstrap page and I’m following a YouTube tutorial but for some reason my navbar doesn’t allow me to style certain things. The background color for one. As you can see by my HTML code below I am trying .navbar{style} but that wont work. if I use .nav{style} then it works. I should add that 3/4 of the way through this tutorial I read the comments and found that this is actually Bootstrap 3, not 4. Could this be my issue?
HTML:
[code]<nav class=”navbar navbar-default navbar-fixed-top” role=”navigation”>
<div class=”container-fluid”>
<div class=”navbar-header”>
<button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”#navbar-collapse-main”>
<span class=”sr-only”>
Toggle Navigation
</span>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
</button>
</div>
<div class=”collapse navbar-collapse” id=”navbar-collapse-main”>
<ul class=”nav navbar-nav navbar-right”>
<li><a class=”active” href=”#”>Home</a></li>
<li><a href=”#”>My Build</a></li>
<li><a href=”#”>Gallery</a></li>
<li><a href=”#”>Supplies</a></li>
</ul>
</div>
</div>
</nav>
CSS:
[code].navbar{
background-color: #0094ff;
padding: 1% 0;
font-size: 1.2em;
}
.navbar-brand{
min-height: 55px;
padding: 0 15px 5px;
}
.navbar-default .navbar-nav li a{
color: white;
}
.navbar-default .navbar-nav li a:hover, .navbar-default .navbar-nav li a:active {
color: grey;
}
Sorry if the coding isn’t pasted in correctly I couldn’t find any buttons to input the code!
Rob
*tags added