I am trying to create something similar to https://www.pinterest.com/ homepage where height is decided as per content of Div & all divs automatically adjusts it self using bootstrap.
I tried to do it but It is not working as expected.
Here is fiddle link of what I have tried http://jsfiddle.net/gmm2jcn5/
In fiddle we can see that there is white gap between 2 divs I want to eliminate that gap.
.col-xs-6 {
border: 1px solid black;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.1/bootstrap.min.js"></script>
<div class="row">
<div class="col-xs-6">
<p class="inntertopheading">heading</p>
<div class="hr"></div>
<div class="innter-md-text">
text
<div class="spacer10"></div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
<div class="col-xs-6">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</div>
<div class="col-xs-6">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</div>
<div class="col-xs-6">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
</div>
</div>
2
Answers
Try the CSS3 column method, this will only require CSS, no modification of markup. The below script will adjust anywhere from 1 to 5 columns based on viewport width:
vaibhav shah Hi there.
To have each div block have the same Height no matter the content you could use a little jquery like this…
Here is a working Fiddle.
Does this help for what you are wanting here?
If you resize the window with your mouse just refresh and see the div blocks change to all having the same height.