I have an Issue with the Bootstrap Carousel.
I want to have the fixed effect but in Firefox it's giving jumps.
HTML
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="carousel-item-content" style="background:url('http://www.kia.ca/content/2018-soul/gallery/gallery-img-3.jpg')">
</div>
</div>
<div class="carousel-item">
<div class="carousel-item-content" style="background:url('http://carimages.silovendes.com/imgAutos/11/1056445-0.jpg')">
</div>
</div>
<div class="carousel-item">
<div class="carousel-item-content" style="background:url('https://kia.com.gt/images/modelos/rio/img/exterior-old//thumb/5.jpg')">
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
CSS
.carousel-item {
width: 100%;
height: 100vh;
}
.carousel-item .carousel-item-content {
width: 100%;
height: 100%;
-webkit-background-size: cover !important;
-moz-background-size: cover !important;
-o-background-size: cover !important;
background-size: cover !important;
background-position: center center !important;
background-repeat: no-repeat !important;
overflow: hidden !important;
background-attachment: fixed !important;
}
You can try it hier:
https://codepen.io/TamZam/pen/ZvQvox
Any ideas why it happens?
Thanks!
Related
I made a product slider using Html Css JS and I want the scrollby left and right goes smoth instead of going directly.
Here is my website it works fine on the first slider but the second slider and third that have this issue
Html
<!-- Container for the layout of the full carousel -->
<div class="container2 cover2">
<div class=" scrolling-wrapper scrollmenu-SLIDER2 scroll-images2">
<div class="card2">
<a href=" https://ma.santemagasin.com/produit/hemoconfort/">
<div class="card-img2">
<img src=" https://ma.santemagasin.com/wp-content/uploads/2022/10/hemo-confort-compr.webp">
<h5 class="Product-Disc"> مكمل طبيعي لراحة البواسير
علاج مضمون من المصدر للبواسير الداخلية
حل نهائي للنزيف والالم</h5>
<p class="Product-Prix"> 249د.م.
</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/iron-hair/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/iron-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي خاص بالرجال
sante magasinمن
حل لتساقط الشعر
ملء فراغات اللحية
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/vitex/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/vtx-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي من كف مريم
للنساء ٬ الدورة الشهرية
الحمل ٬ 60 كبسولة نباتية
صنع مغربي٬ 300 ملغرام
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/perfecto/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/prfrcto-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
لزيادة المناطق الأنثوية
بدون أضرار جانبية
مستخلصات طبيعية
60 كبسولة٬ 300 ملغرام
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/hair-lit/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/hair-lit-300x300.webp">
<h5 class="Product-Disc">
للنساء الشعر والاضافر
تركيبة مطورة ٬ مكمل طبيعي
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/strong-carti/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/strong-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي من
sante magasin
حل للسياتيك والروماتيزم
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/pure-skin/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/pure-skin-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
من sante magasin
بشرة صافية خالية
من الشوائب والبثور
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/maca/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/maca-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
من sante magasin
كبسولات جذور الماكا
الطبيعية - العضوية
محفز الطاقة والقوة
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/collagen-complex/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2021/11/collagine-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
من sante magasin
كولاجين بحري
تركيبة طبيعية
60 كبسولة نباتية
</h5>
<p class="Product-Prix">199 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/control-cholesterol/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/bio-cholesto-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
من sante magasin
كوليسترول متوازن
محاربة الدهون الثلاثية
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/bio-oral-complement-alimentaire/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/bio-oral-300x300.webp">
<h5 class="Product-Disc">
مكمل لصحة الفم
حل طبيعي من المصدر
الرائحة الكريهة٫ اللثة
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/ibs-active-complement-alimentaire/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/ibs-300x300.webp">
<h5 class="Product-Disc">
مستخلصات طبيعية
300 ملغرام - 60 كبسولة
راحة الجهاز الهضمي
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/saw-palmetto/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/palmetto-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي
من sante magasin
للرجال - صحة البروستاتا
مستخلصات طبيعية
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
<div class="card2">
<a href="https://ma.santemagasin.com/produit/zen-stress/">
<div class="card-img2">
<img src="https://ma.santemagasin.com/wp-content/uploads/2022/09/zen-strees-300x300.webp">
<h5 class="Product-Disc">
مكمل طبيعي مغربي
من sante magasin
نوم مريح - حل للتوتر العصبي
60 كبسولة نباتية
</h5>
<p class="Product-Prix">249 د.م.</p>
<span class="Stars">★★★★★</span>
</div>
</a>
</div>
</div>
</div>
<div class="cover2">
<button class="left" onclick="leftScroll2()">❮</button>
<button class="right" onclick="rightScroll2()">❯</button>
</div>
CSS
.cover2 {
padding: 0px 30px;
position: relative;
}
.left {
position: absolute;
right: -20px;
top:-170PX;
background-color: transparent !important;
color: #006f07 !important;
font-size: 20px;
font-weight: bold;
border-color: grey;
border-radius: 20%;
}
.right:hover {
background-color: #006F07 !important;
color: white !important;
}
.left:hover {
background-color: #006F07 !important;
color: white !important;
}
.right {
position: absolute;
left: -20px;
top:-170PX;
background-color: transparent !important;
color: #006f07 !important;
font-size: 20px;
font-weight: bold;
border-color: grey;
border-radius: 20%;
margin-left :-10px;
}
.scrollmenu-SLIDER2 {
width: 100%;
height: auto;
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
overflow-y: hidden;
}
.container2 {
display: flex;
overflow-x: auto;
}
.card2 {
padding: 10px;
margin: 10px;
border-radius: 20px;
line-height: 1.2;
background-color: white;
text-align: center;
}
.card2 img{
border-radius: 10px;
}
.Product-Prix{
text-decoration:none;
color : #006f07;
font-size: 20;
font-weight: bold;
margin:5px !important;
}
.Product-Disc{
color: #789FD6;
font-size: 15px;
display: -webkit-box;
max-width: 200px;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-align: center;
padding-top: 5px;
margin: auto;
width: 100%;
}
.scroll-images {
width: 100%;
height: auto;
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
}
.Stars{
display: flex;
justify-content: center;
color: orange;
letter-spacing: 0.5px;
font-size: 20px;
}
.card-img2 {
width: 09rem;
}
::-webkit-scrollbar {
display: NONE;
}
#media only screen and (max-width: 800px) {
.card-img2 {
width: 07rem;
}
.card-img3 {
width: 10rem;
}
.left , .right {
display:none;
}
.cover2{
padding: 0px 5px;
position: relative;
}
JS
<script>
function leftScroll2() {
const left = document.querySelector(".scroll-images2");
left.scrollBy(2000, 0) ;
}
function rightScroll2() {
const right = document.querySelector(".scroll-images2");
right.scrollBy(-2000, 0) ;
}
</script>
I tried give different classes for every element than the first slider but the same problem still stop the slider from going smoothly
Unable to set card footer as expected output
Expected output:
My Code:
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-md-3">
<div class="card">
<img src="https://images.unsplash.com/photo-1523805009345-7448845a9e53?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=752&q=80" class="card-img-top" alt="...">
<div class="card-img-overlay">
<h5 class="card-title"></h5>
</div>
<div class="card-footer text-center">
<h6>
Africa
</h6>
<h4>
Kenya
</h4>
</div>
</div>
</div>
jsfiddle: https://jsfiddle.net/sidh_41/p8sdfy7u/2/
.card-footer:last-child {
border-radius: 0!important;
}
.card-footer {
padding: 0!important;
background-color: unset!important;
border-top: unset!important;
}
.text-center {
color: #fff;
}
.card-img-overlay {
display: flex;
flex-direction: column;
justify-content: flex-end;
height: 100%;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-md-3">
<div class="card">
<img src="https://images.unsplash.com/photo-1523805009345-7448845a9e53?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=752&q=80" class="card-img-top" alt="...">
<div class="card-img-overlay">
<h5 class="card-title"></h5>
<div class="card-footer text-center">
<h6>
Africa
</h6>
<h4>
Kenya
</h4>
</div>
</div>
</div>
</div>
Try this:
.card-footer:last-child {
border-radius: 0!important;
}
.card-footer {
padding: 0!important;
background-color: unset!important;
border-top: unset!important;
}
.text-center {
color: #fff;
}
.card-img-overlay {
display: flex;
flex-direction: column;
justify-content: flex-end;
height: 100%;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-md-3">
<div class="card">
<img src="https://images.unsplash.com/photo-1523805009345-7448845a9e53?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=752&q=80" class="card-img-top" alt="...">
<div class="card-img-overlay">
<h5 class="card-title"></h5>
<div class="card-footer text-center">
<h6 class="m-0 small">
AFRICA
</h6>
<h1>
Kenya
</h1>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="card">
<img class="card-img" src="https://images.unsplash.com/photo-1523805009345-7448845a9e53?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=752&q=80" alt="...">
<div class="card-img-overlay">
<h5 class="card-title"></h5>
<div class="card-footer text-center">
<h6>
Africa
</h6>
<h4>
Kenya
</h4>
</div>
</div>
</div>
</div></div>
I think you need to add another div surrounding the card. This div needs to have the class row
.img-wrapper{
position: relative;
text-align: center;
color: white;
}
.card-footer{
position: absolute;
top: 60%;
left: 50%;
transform: translate(-50%, -50%);
}
h3, h1{
color: #fff
}
<div class="col-md-3">
<div class="card">
<div class="img-wrapper">
<img src="https://images.unsplash.com/photo-1523805009345-7448845a9e53?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=752&q=80" class="card-img-top" alt="...">
<div class="card-img-overlay">
<h5 class="card-title"></h5>
</div>
</div>
</div>
<div class="card-footer text-center">
<h3>
Africa
</h3>
<h1>
Kenya
</h1>
</div>
</div>
</div>
Hello and thanks in advance for the help. Here's a link to the site in question: caulfield.co/test/originals.html
I'm attempting to create a responsive navbar in which the current dropdown-items appear as the standard nav-items after collapse.
See this image:
The dropdown-items are displaying as intended on desktop. On mobile, however, the separate dropdown is unnecessary. Here is how it displays with Bootstrap 4 out of the box:
Does anyone know of a convenient or custom solution to remove the dropdown once the navbar-collapse is in use on mobile etc such that the dropdown-items appear just like the navbar-items? Ideally, the "More" nav-link would display:none and the nav-items would continue from "Contact" to "Works On Display" seamlessly.
HTML:
<nav id="navHome" class="navbar navbar-expand-lg navbar-light sticky-top">
<div class="container-fluid max-width-940">
<a class="navbar-brand" href="index.html">
<img src="images/mb.svg" alt="Margaret Biggs" width="220px"/>
</a>
<button class="navbar-toggler togglerNoBorder" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse backgroundWhite" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="bio.html">Bio <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="originals.html">Originals</a>
</li>
<li class="nav-item">
<a class="nav-link" href="exhibition.html">Exhibition</a>
</li>
<li class="nav-item">
<a class="nav-link" href="prints.html">Prints</a>
</li>
<li class="nav-item">
<a class="nav-link" href="professionals.html">For Professionals</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
<li class="nav-item dropdown navDropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
More
</a>
<div class="dropdown-menu navDropdown" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="works-on-display.html">Works on Display</a>
<a class="dropdown-item" href="poetry.html">Poetry</a>
<a class="dropdown-item" href="commissions.html">Commissions</a>
<a class="dropdown-item" href="blog.html">Blog</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
CSS:
.navbar-right {
float:right;
}
.togglerNoBorder{
border: 0px solid transparent;
}
.nav940{
max-width:940px;
margin:0 auto;
}
#navHome {
color:rgb(34, 34, 34);
font-size:13px;
font-weight:400;
line-height:16px;
text-transform:uppercase;
background-color:white;
height:60px;
box-shadow: 0 0 18px -4px #000;
}
#navHome a{
color:rgb(34, 34, 34);
}
#navHome a:hover{
color:#165fa5;
}
.navDropdown {
font-size:13px;
}
.navDropdown a:hover {
background-color:white;
}
.backgroundWhite{
background-color:white;
}
.nav-item{
padding-left:10px;
}
.dropdown-item {
padding-top:10px;
}
.navbar-brand {
margin-bottom:3px;
}
.dropdown-menu {
top:45px;
}
Use a #media query for mobile (<992px) to show the dropdown-menu as normal nav-links...
#media (max-width: 992px) {
.dropdown-toggle {
display: none;
}
.dropdown-menu {
display: block;
position: relative;
border-width: 0;
padding: 0;
margin: 0;
}
.dropdown-item {
padding: .5rem 0rem;
color: rgba(0,0,0,.5);
}
}
https://www.codeply.com/go/lAAQOwhAx0
Based on the excellent answer by #Zim, I modified the style a bit to fit one by side in a dark navbar. Tested with Bootstrap 5, but I guess it should work in Bootstrap 4 as well.
#media (max-width: 992px) {
.dropdown-toggle {
display: none;
}
.dropdown-menu {
position: relative;
display: contents;
border-width: 0;
padding: 0;
margin: 0;
color: transparent;
}
.dropdown-item {
color: white;
background-color: black;
display: inline;
}
}
I'm newbee in Boostrap and I try since 2 days to manage Boostrap carouseul mode.
My images in slide are Disproportionate when I resize navigator ! I was unable to find solution. I try many solution in CSS but I naver finnd solution.
I use default CSS parameter, present in carousel mode. I try carousel mode from w3schools (image are not corrupt when we resize navigator).
My CSS
/* Carousel base class */
.carousel {
height: 500px;
margin-bottom: 60px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;
}
/* Declare heights because of positioning of img element */
.carousel .item {
height: 500px;
background-color: #777;
}
.carousel-inner > .item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 500px;
margin: auto;
}
My HTML
<!-- Carousel
================================================== -->
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img class="first-slide" src="media/image1.jpg" alt="">
<div class="container">
<div class="carousel-caption">
<h1>Secucampus.com</h1>
<p class="trans"> bla bla</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Plus d'informations</a></p>
</div>
</div>
</div>
<div class="item">
<img class="second-slide" src="media/image2.jpg" alt="">
<div class="container">
<div class="carousel-caption">
<h1>Secucampus.com</h1>
<p class="trans">bla bla</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Contactez nous</a></p>
</div>
</div>
</div>
<div class="item">
<img class="third-slide" src="media/image3.jpg" alt="">
<div class="container">
<div class="carousel-caption" style="text-align:left">
<h1>bla </h1>
<p></p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Contenu des cours</a></p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div><!-- /.carousel -->
The result when I resize image to Smarphone mode :
Thank for your help
Regard
Edit : Banzay :
I try to remove it and the result decrease image in hignht when I reduce the width of the navigateur.
Is it possible to create navigation bar with image icon at page bottom by using twitter bootstrap, here is sample image of the icon bar,
Here is an example for you :
<div class="nav-bottom">
<ul class="container nav nav-pills">
<li class="col-xs-4 col-sm-2 active">
<a href="#">
<i class="glyphicon glyphicon-comment"></i><br>
Message Board
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-home"></i><br>
Rooms
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-shopping-cart"></i><br>
Shopping List
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-wrench"></i><br>
Home Helpers
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-cog"></i><br>
Settings
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-user"></i><br>
User
</a>
</li>
</ul>
</div>
.nav-bottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: black;
padding: 5px 0;
}
.nav-bottom li + li {
margin-left: 0px;
}
.nav-bottom li a {
text-align: center;
background: black;
color: #ecf0f1;
}
.nav-bottom li:hover a,
.nav-bottom li:focus a {
background: #2980b9;
color: #ecf0f1;
}
.nav-bottom li.active a {
background: black;
color: #3498db;
}
Bootply