A simple question is here using Bootstrap3 . I wanted to create a small filter that reloads the page below it. My requirement was to align this filter (two inputs and a small button) with the content sitting under it, which makes it possible in the rightmost position .
I tried using the pull-right class, and indeed, it pulled the filter to the right, but even more space to fill. If you check the example below, you will see that my goal is to align the button on the right side of the purple line , but it fails.
I really don’t understand why this is happening, but I assume that this is due to some problems with stock / row filling. I am looking for an answer explaining why this is happening, so I can understand the problem and won't deal with it again :).
You can check my markup by clicking here on bootply
I also posted my markup right here:
<div class="container"> <div class="row" style="background:slateblue;"> <div class="col-xs-12"> <form role="form" class="form-horizontal"> <div class="form-group pull-right"> <div class="col-xs-4"> <input type="text" class="form-control text-center"> </div> <div class="col-xs-4"> <input type="text" class="form-control text-center"> </div> <div class="col-xs-2 col-sm-2" style="margin-top:3px;"> <button type="submit" class="btn btn-success"> <span class="glyphicon glyphicon-refresh"></span> </button> </div> </div> </form> </div> </div> <div class="row" style="background:slategrey; height:200px;"> </div> </div>
source share