0

I want to remove the top spacing so that it's next to each other.

img

I marked the spacing that's need to be removed in red. The code I use:

<div class="row">
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
    <div class="col-md-6">
        <img src="myimage.png">
    </div>
</div>

But when my div is higher that the other element next to the div it's not placed next to the other. It's like the row is used after 2 col-md-6.

Robin Dirksen
  • 3,322
  • 25
  • 40
  • So you say that every column contains the same image? From your code that is implied, but the image says something else. Please and a full working example that shows the problem. – Ionut Necula Jan 27 '17 at 11:21

1 Answers1

0

all div contents must same height(set css min-height for all div) you can use that code other wise use this type..

<div class="row">
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
        <div class="col-md-6">
            <img src="myimage.png">
        </div>
    </div>
yathavan
  • 183
  • 1
  • 14