Aman
Aman

Reputation: 997

Getting wrong Image gallery in Bootstrap

I am new to Bootstrap and want to make a Image gallery. How I expect is

enter image description here

But I am getting it like this:

enter image description here

My HTML code is this:

<div class="row">
                    <div class="col-md-4">
                        <a href="#" class="thumbnail">
                            <img src="img/sell/5.jpg" class="img-responsive" alt="...">
                        </a>
                    </div>
                    <div class="col-md-8">
                        <div class="col-md-12">
                            <a href="#" class="thumbnail">
                                <img src="img/slider/slider-1.jpg" class="img-responsive" alt="...">
                            </a>
                        </div>
                        <div class="col-md-6">
                            <a href="#" class="thumbnail">
                                <img src="img/sell/5.jpg" class="img-responsive" alt="...">
                            </a>
                        </div>
                        <div class="col-md-6">
                            <a href="#" class="thumbnail">
                                <img src="img/sell/5.jpg" class="img-responsive" alt="...">
                            </a>
                        </div>
</div>

Please tell how to write the correct code.

Upvotes: 0

Views: 95

Answers (1)

Muhammad Ali
Muhammad Ali

Reputation: 698

You have the correct code. The difference is, your left image is just not equal is height to the right images.

In the expectation example, the left image is equal to the height of the 2 rows of images on the right. Using a longer image on the right will fix it (or giving the left column more wider column space).

Upvotes: 0

Related Questions