Recently delving into the realm of Twitter Bootstrap, I find myself pondering on the best approach to incorporate a border around a parent element.
Consider this scenario:
<div class="main-area span12">
<div class="row">
<div class="span9">
//Possibly some descriptive text
</div>
<div class="span3">
//Perhaps a button or similar element
</div>
</div>
</div>
If I try to add a border using the following CSS:
.main-area {
border: 1px solid #ccc;
}
The grid layout will shift and push the span3
element down to the next row due to the increase in overall width caused by the border..... How can one effectively apply styles like borders or padding to parent <div>
elements in such cases?