hmahdavi
hmahdavi

Reputation: 2354

How to set position of bootstrap slider images to center?

I want in my bootstrap slider the images placed in center of page such as this imageenter image description here:

In this slider two section must be empty :

right and left section

<!--Slider-->
<div class="row">

    <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->

        <div class="carousel-inner">
            <div class="item">
                <img src="images/4172_780x354_hp_mysterious_v1.jpg" />
                <div class="container">
                </div>
            </div>
            <div class="item">
                <img src="images/4181_780x354_hp_kitchen_v1.jpg" />
                <div class="container">
                </div>
            </div>
            <div class="item active">
                <img src="images/4182_780x354_hp_sport-wear_v1.jpg" />
                <div class="container">
                </div>
            </div>
        </div>
    </div>
</div>

I use this codes but images placed in right of page.

My website direction is right to left

Upvotes: 1

Views: 527

Answers (1)

salma sultana
salma sultana

Reputation: 126

You can try this

.carousel-inner img {
  margin: auto;
}

Upvotes: 1

Related Questions