I want the image to stretch the entire screen.
There are 2 problem that I face with this carousel.
Case 1. The screen is too narrow.There is a white strip at the bottom Example.
Case 2. The screen is too wide. The carousel indicator cannot be seen. Example.
When I add a fifth slide, no image, just make the carousel item red. Surprisingly the item spans the entire height of the screen. So now, I wonder if the item that the image is in spans the entire height of screen, and the image is set to height:100% (of the item that its in), should the image be filling the entire height of the screen as well.
.full{
width:100%;
height:100%;
}
.color{
background:red;
}
html,body{height:100%;}
.carousel,.item,.active{height:100%;}
.carousel-inner{height:100%;}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="myCarousel" class="carousel slide fill" 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>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner role="listbox">
<div class="item active">
<img class="full" src="https://static.pexels.com/photos/36764/marguerite-daisy-beautiful-beauty.jpg" alt="Chania" >
</div>
<div class="item">
<img class="full" src="https://static.pexels.com/photos/36753/flower-purple-lical-blosso.jpg" alt="Chania">
</div>
<div class="item">
<img class="full" src="https://static.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg" alt="Flower">
</div>
<div class="item">
<img class="full" src="https://s-media-cache-ak0.pinimg.com/736x/ce/6e/77/ce6e7783134c1995b9c56ad9e9b96f76.jpg" alt="Flower ">
</div>
<div class="item color">
</div >
</div>
<!-- Left and right controls -->
<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>
</div>
</div>