I wanted the carousel-indicators below the images. This required some styling changes to still use Bootstrap for this carousel (see full code below). I added the border-color
to the indicators and I added a bit of styling to the carousel-indicators
class: position:static; padding-top:10px; width: 100%; margin-left:0;
.
The problem is the size of the indicators. If a visitor clicks one of the indicators, the carousel correctly goes to that image. However, the indicators don't change: that is, the indicator that started as active
is still larger than the other two indicators (you would now expect the clicked indicator to be the larger one). The first indicator continues to keep the active
class
. What could be causing this problem?
<div id="carouselvideo" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="item active">
<iframe width="250" height="250" src="https://www.youtube-nocookie.com/embed/xxx></iframe>
</div>
<div class="item">
<iframe width="250" height="250" src="https://www.youtube-nocookie.com/embed/xxx></iframe>
</div>
<div class="item">
<iframe width="250" height="250" src="https://www.youtube-nocookie.com/embed/xxx></iframe>
</div>
</div>
</div>
<script> //The problem persists also if I remove this script line.
$("#carouselvideo").carousel({interval: false});
</script>
<ol class="carousel-indicators" style="position:static; padding-top:10px; width: 100%; margin-left:0;">
<li data-target="#carouselvideo" data-slide-to="0" style="border-color: #333;" class="active"></li>
<li data-target="#carouselvideo" data-slide-to="1" style="border-color: #333;"></li>
<li data-target="#carouselvideo" data-slide-to="2" style="border-color: #333;"></li>
</ol>
Update: If I move the last five lines inside the carouselvideo
div, then the problem is gone. However, I dont wan't it there because I want the indicators below the carousel (see How to create this bootstrap carousel of iframes?). Why would this problem exist when the indicators code is placed outside the carousel?