I have just successfully set up a 3-image carousel on my site using Bootstrap. This is what it looks like:
If you notice, the indicators are square and I want them to be round! All the tutorials I have followed thus far seem to get it right; I have never seen anyone else's carousel with square indicators. Here's my HTML:
<!-- Carousel start -->
<div id="myCarousel" class="carousel slide">
<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">
<div class="item active">
<img src="bootstrap/img/home-page-banner.jpg"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading One</h1>
<p>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum </p>
<p><a class="btn btn-large btn-primary">Sign up!</a></p>
</div>
</div>
</div>
<div class="item">
<img src="bootstrap/img/home-page-banner.jpg"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading One</h1>
<p>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum </p>
<p><a class="btn btn-large btn-primary">Sign up!</a></p>
</div>
</div>
</div>
<div class="item">
<img src="bootstrap/img/home-page-banner.jpg"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading One</h1>
<p>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum </p>
<p><a class="btn btn-large btn-primary">Sign up!</a></p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
<!-- Carousel end -->
What do you think I am going wrong with here? Is there any class I should be using with the carousel-indicators
<ol>
that I am not aware of yet?
P.s.: I have already tried .carousel-indicators { border-radius: 100%;}
with no success.
Add
border-radius
:Note that you have to target the
li
tags within thecarousel-indicators
class and also do50%
not100%
.So you don't have to use
!important
to override the default border-radius:You can try this:
For Bootstrap 4 I did this in my style sheet: