how to display 2 form fields on same line with bootstrap -


i creating form in bootstrap should responsive. see below code.

<form novalidate="novalidate" class="form-inline">         <div class="form-group">             <label class="col-sm-4 control-label" for="inputfirstname">first name:</label>              <div class="col-sm-4">                 <input class="form-control" type="text" id="inputfirstname" ng-model="patient.firstname"/>             </div>         </div>         <div class="form-group">             <label class="col-sm-4 control-label" for="inputlastname">last name:</label>              <div class="col-sm-4">                 <input class="form-control" type="text" id="inputlastname" ng-model="patient.lastname"/>             </div>         </div>          <div class="form-group">             <label class="col-sm-4 control-label" for="inputmiddlename">middle name:</label>              <div class="col-sm-4">                 <input class="form-control" type="text" id="inputmiddlename" ng-model="patient.middlename" placeholder="middle name"/>             </div>         </div> </form> 

i need have 2 fields(firstname , lastname) on same line , middle name in other line. , there around 10 fields in form.

when use form-inline 3 fields arranged in 1 line , there no space between fields of rows.

how should understand .col css. how related responsive.

i have done demo should fit requirements.

i have changed form-group classes col-md-12 span whole screen , wrapped form in container-fluid class.

markup:

<div class="container-fluid"> <form novalidate="novalidate" class="form-inline">     <div class="col-md-6">         <label class="col-sm-4 control-label" for="inputfirstname">first name:</label>          <div class="col-sm-4">             <input class="form-control" type="text" id="inputfirstname" ng-model="patient.firstname">         </div>     </div>     <div class="col-md-6">         <label class="col-sm-4 control-label" for="inputlastname">last name:</label>          <div class="col-sm-4">             <input class="form-control" type="text" id="inputlastname" ng-model="patient.lastname">         </div>     </div>      <div class="col-md-12">         <label class="col-sm-2 control-label" for="inputmiddlename">middle name:</label>          <div class="col-sm-4">             <input class="form-control" type="text" id="inputmiddlename" ng-model="patient.middlename" placeholder="middle name">         </div>     </div> </form> </div> 

in order obtain space between first , second line, can override bootstrap css adding .col-md-12{margin-top:20px;}


Comments

  1. thanks for nice information. Are you looking for best dissertation editing, writing and proofreading services? Our Dissertation Editors provide the highest standard of editing available

    ReplyDelete
  2. get homework help by students assignment help in UK.we are bunch of experts of homework.We give best services of homework.

    ReplyDelete
  3. What a wonderful piece of information looking forward for more. Everyday hustle and bustle make it difficult for most people to get some time for hitting the gym, but doing a few yoga poses right in the comfort of your home can be good enough. All from Best Yoga Wheel

    ReplyDelete

Post a Comment

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -