afn afn - 5 months ago 30
CSS Question

Bootstrap - Carousel in half of page

I want to use Bootstrap carousel in half of page (in Desktop). Here is my code :

HTML :

<div>
<div class="row">
<div class="col-md-6">
<div id="carousel-homepage" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-homepage" data-slide-to="0" class="active"></li>
<li data-target="#carousel-homepage" data-slide-to="1"></li>
<li data-target="#carousel-homepage" data-slide-to="2"></li>
</ol>

<div class="carousel-inner">
<div class="item active">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>

</div>
<div class="item">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>

</div>
<div class="item">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>

</div>
</div>

<a class="left carousel-control" href="#carousel-homepage" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-homepage" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>

<div class="col-md-6 low-padding-left"></div>


And here is my result :

enter image description here

I want to put carousel completely in half of page. Any suggestion?

Answer

Remove padding from first .col-md-6 div or add style="padding:0"