Bootstrap change div order with pull-right, pull-left on 3 columns

Bootstrap 3 Using Bootstrap 3’s grid system: <div class=”container”> <div class=”row”> <div class=”col-xs-4″>Menu</div> <div class=”col-xs-8″> <div class=”row”> <div class=”col-md-4 col-md-push-8″>Right Content</div> <div class=”col-md-8 col-md-pull-4″>Content</div> </div> </div> </div> </div> Working example: http://bootply.com/93614 Explanation First, we set two columns that will stay in place no matter the screen resolution (col-xs-*). Next, we divide the larger, right hand … Read more

Div side by side without float

The usual method when not using floats is to use display: inline-block: http://www.jsfiddle.net/zygnz/1/ .container div { display: inline-block; } Do note its limitations though: There is a additional space after the first bloc – this is because the two blocks are now essentially inline elements, like a and em, so whitespace between the two counts. … Read more

CSS container div not getting height

Add the following property: .c{ … overflow: hidden; } This will force the container to respect the height of all elements within it, regardless of floating elements. http://jsfiddle.net/gtdfY/3/ UPDATE Recently, I was working on a project that required this trick, but needed to allow overflow to show, so instead, you can use a pseudo-element to … Read more

Why do s clear floats?

Apparently <fieldset> elements are supposed to generate block formatting contexts for their contents: The fieldset element is expected to establish a new block formatting context. That’s why floated elements don’t float out of them. I would guess that this has to do with the nature of fieldsets as visual form control groups. There could be … Read more