I have my page laid out like this:
[ ROW 1 Col 1 Col 2 ]
[ ROW 2 Col 1 ]
When I shrink the browser window (i.e. to test responsive behaviour) I want Row 1 to push Row 2 down to make room for its content, like this:
[ ROW 1 Col 1 ]
[ ROW 1 Col 2 ]
[ ROW 2 Col ]
The problem is that when I shrink the browser Row 2 stays fixed in place and the text in Col 2 of Row 1 floats down over the top of Row 2.
Does any one have an idea why this might be? As far as I can tell, it's standard for twitter bootstrap divs to fold vertically at breakpoints. Mine don't do that. I've spent a few hours reading and trying-out several things (clearfix, re-arranging the divs etc) , but can't figure it out.
Here is the code:
In the section I have:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
And the body:
<div class="container">
<!-- ROW 1 -->
<div class="row">
<!-- COL 1 -->
<div class="col-md-8">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
</div>
<!-- COL 2 -->
<div class="col-md-4">
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis</p>
</div>
</div>
<!-- ROW 2 -->
<div class="row">
<!-- COL 1 -->
<div class='col-md-12'>
<h1> Another section</h1>
<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti</p>
</div>
</div>
</div> <!-- end of Container -->
It's probably staring me in the face, but I can't see it.
Many thanks.
I was asked for my CSS classes. I am using the latest version of Bootstrap plus the following:
.row {
margin-right: 0;
margin-left: 0;
background-color: #FFFFFF;
}
.container{
border:1px solid #000000;
}