Bootstrap full carousel unwanted margins -
i can't figure out why can't rid of white margins on carousel. have carousel's pictures fill whole space left right.
could tell me how correct code please?
body { padding: 0; margin: 0; overflow-y: scroll; font-family: arial; font-size: 18px; } .carousel .item { width: 100%; /*slider width */ } .carousel .item img { width: 100%; /*img width*/ } .container { width: 100%; } <div class="container"> <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> <!-- wrapper slides --> <div class="carousel-inner"> <div class="item active"> <img id="beach" src="images/beach.jpg"> </div> <div class="item"> <img src="images/mountain.jpg"> </div> <div class="item"> <img src="images/island.jpg"> </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> </div>
make sure have used bootstrap's grid correctly. container row , no column leave 0 padding.
<div class="container-fluid"> <div class="row"> <div class="carousel-inner">
your browser's document inspector show element(s) causing issues this.
Comments
Post a Comment