html - Bootstrap pull-right not working as expected -


simple question here using bootstrap3. wanted create sort of small filter reloads page below it. requirement align filter (two inputs , small button) content sitting below it, making fall to rightest position possible.

i tried using pull-right class , indeed pulled filter right there's still more room fill. if check example provided below, you'll see my objective align button right side of purple row, fails.

i don't understand why happens, assume it's related margin/padding issues rows.. i'm looking answer explaining why happens can understand problem , won't deal again :).

you can check markup by clicking here on bootply

also i'll post 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><!-- main col 12-->   </div><!--row-->   <div class="row" style="background:slategrey; height:200px;">   </div> </div> 

your form-group aligned far right possible – content within not. have 4+4+2 wide columns in there, “two columns short”, in 12-column grid used bootstrap.

you might want offset first 1 of 2, adding col-xs-offset-2 class – alignment should closer want achieve.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -