My grid setup now is as follows:
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"/>
<div class='col-md-12 col-sm-12 col-xs-12'>
<div class='col-md-9 col-sm-9 col-xs-12 text-center' style="height:200px;background-color:#0077CC; border-right:2px solid white; border-bottom: 2px solid white">
DIV 1
</div>
<div class='col-md-3 col-sm-3 col-xs-12'style="height:320px;background-color:#0077CC; border-right:2px solid white; border-bottom: 2px solid white">
DIV 2
</div>
<div class='col-md-9 col-sm-9 col-xs-12 text-center' style="height:200px;background-color:#0077CC; border-right:2px solid white; border-bottom: 2px solid white">
DIV 3
</div>
</div>
I want to get rid of the white space between div 1 and div 3. I don’t want to merge div 1 and div3 because in mobile mode div 2 goes below div 3.
How can I achieve this in bootstrap?
2
Answers
Its quite simple: below is a demo for the same using bootstrap 4.
A grid must be wrapped inside a
container
and acol
always inside arow
.Here is a JSFIDDLE link to play around with
How about this
Here’s a JSfiddle https://jsfiddle.net/rutmws7a/