I just created a a navbar and a hover feature.But the problems are now that when I hover on HOME,BEDROOMS and CONTACT US,the color has no effect entirely from top to bottom on the navbar...but on the others(Eg: FACILITIES SERVICES) the color has full effect.
HTML
<nav class="navbar"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav" style="padding-top:10px"> <li><span class="details"><strong>Phone</strong> </span><span class="contacts">021 913 0643</span></li> <br/> <span class="details"><strong>Email</strong> </span> <a class="contacts" href="#">[email protected] </a> </ul> <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="#"><span ></span>Home</a></li> <li><a href="#"><span ></span> FACILITIES<br/> SERVICES</a></li> <li><a href="#">BEDROOMS</a></li> <li><a href="#">RATEs <br/> & BOOKINGS</a></li> <li><a href="#">SURROUNDING<br/> ATTRACTIONS</a></li> <li><a href="#">CONTACT US</a></li> </ul> </div> </div> </nav> CSS
.navbar{ padding: 0 px; background: #331a00; padding-left:12px; padding-right: 12px; border: 0px; } .navbar ul.navbar-right li a{ color: #ffffff; text-align: center; text-decoration: none; text-transform: uppercase; padding-top: 30px; padding-bottom: 20px; margin:0; text-align: center; } .navbar ul.navbar-right li a:hover{ background:#000000; } Check fiddle here