-1

Im working on a Bootstrap site and dont understand how to place my divs. How i want it to look

I dont understand how i can get the div3 to take 2 rows with Bootstrap.

http://jsfiddle.net/7c6sneh3/

HTML

<div class="container">
    <div class="row">
        <div class="example col-md-6"></div>
        <div class="example col-md-6"></div>
    </div>
     <div class="row">
        <div class="example col-md-6"></div>
    </div>
</div>

CSS

.example{
    height: 100px;
    width: 300px;
    border: 1px solid black;
    background-color: red;
}
Skaudel
  • 112
  • 9

3 Answers3

2

Here is what you are trying to get.

.example{
    height: 250px;
    width: 100%;
    border: 5px solid black;
    background-color: lightblue;
    margin: 0 auto;
}

.sidebar{
     height:500px;   
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid">
 <div class="row">
  <div class="col-md-8">
   <div class="row">
    <div class="col-md-12">
     <div class="example">
      
     </div>
    </div>

    <div class="col-md-12">
     <div class="example">
      
     </div>
    </div>
   </div>
  </div>

  <div class="col-md-4">
   <div class="col-md-12">
    <div class="example sidebar">
      
    </div>
   </div>
  </div>
 </div>
</div>
Xahed Kamal
  • 2,203
  • 1
  • 20
  • 41
1

Running short of time here, but I strongly think you should consider checking this documentation : http://www.w3schools.com/bootstrap/bootstrap_grid_examples.asp With a bit of research on it you should be able to find something, hope someone will help you otherwise !

Alexandre Beaudet
  • 2,774
  • 2
  • 20
  • 29
1

I should have done some more research before i asked the question. I found the answer in this previous stackeroverflow question.

How can I get a Bootstrap column to span multiple rows?

Community
  • 1
  • 1
Skaudel
  • 112
  • 9