I am currently mastering Angular and Bootstrap for a potential job opportunity, so I have decided to create a simple demo page. However, I am facing an issue with getting a new row to stack after the last div of the previous row when resizing. Initially, my page layout looks like this:
Picture|Text|Btn|Btn <- Row 1
[ hidden div ]
| 12 point col | <- Row 2
When I resize the page, the elements end up stacking like this:
Picture
|Text12 p col|
Btn
Btn
The desired outcome is for the elements to stack as follows:
Picture
Text
Btn
Btn
|12 pt col|
Kindly review the code below. I believe there might be a fundamental concept that I am missing. The type of column is not crucial; I just want the stacking behavior to function correctly.
<div class="container-fluid" id="mainFrame" ng-controller="mainController">
<div class="row" id="row1">
<div class="col-sm-2">
<img src="img/blah.jpg">
</div>
<div class="col-sm-4" id="nameplate">
<p>Lorem Ipsum</p>
<p>sit amet dolor</p>
</br>
<p>Demo Page</p>
<p>Frameworks: Angular and Bootstrap</p>
</div>
<div class="col-sm-3"><div class="btn" id="bluebtn"><p>Push Me!</p></div></div>
<div class="col-sm-3"><div class="btn" id="redbtn"><p>Push Me!</p></div></div>
</div>
<!-----------------Top of hidden row-------------------------->
<div class="jumbotron container-fluid" ng-show="false"></div>
<!-----------------Top of row 3-------------------------->
<div class="col-sm-12"><p>Test</p><p>Blah</p><p>Blah</p></div>
</div>
Below is the CSS I am using:
img
{
height:30vh;
padding:1vh 1vw;
position:relative;
top:8vh;
}
div
{
border: 1px solid black;
}
.row div
{
height:100%;
}
.row div div
{
height:30px;
}
#nameplate
{
vertical-align: bottom;
margin: auto;
text-align:center;
}
#nameplate p
{
margin:2vh 2vw;
}
#mainFrame
{
height: 100%;
}
Any assistance or suggestions would be greatly appreciated! Thank you.