Can someone explain to me why BS has a 1px height set by default? IT was this way in 2 and 3 and I never understood why? I know it says in the comments "Prevent columns from collapsing when empty" but what browsers does it do this?
Width and Height Utilities The width and height can be set for an element, by using 25%, 50%, 75%, 100%, and auto values. For instance, use w-25 (for remaining values, replace 25 with those values) for width utility and h-25 (for remaining values, replace 25 with those values) for height utility.
If you want to have a true 100% width element, simply put a w-100 class on your div without container . In your case, when you are using a container , switch it to a fluid one by replacing it with container-fluid , and adding a p-0 class as well.
the numbers (1-12) represent a portion of the total width of any div. all divs are divided into 12 columns. so, col-*-6 spans 6 of 12 columns (half the width), col-*-12 spans 12 of 12 columns (the entire width), etc.
Use the . col class on a specified number of elements and Bootstrap will recognize how many elements there are (and create equal-width columns).
Try and you will know: http://bootply.com/82722
<div class="container" style="background-color:orange;">
<div class="row">
<div class="col-sm-6" style="background-color:blue;"></div>
<div class="col-sm-6" style="background-color:red;">right</div>
</div>
</div>
<div class="container" style="background-color:orange;">
<div class="row">
<div class="col-sm-6" style="background-color:blue;min-height:0"></div>
<div class="col-sm-6" style="background-color:red;">right</div>
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With