html - Align Input text fields next to each other -


i have following html layout:

<div class="editor-page">   <div class="container page">     <div class="row">       <div class="col-md-10 offset-md-1 col-xs-12">          <list-errors [errors]="errors"></list-errors>          <form [formgroup]="articleform">           <fieldset [disabled]="issubmitting">              <fieldset class="form-group">               organization name<input class="form-control"                 formcontrolname="orgname"                 type="text"                 placeholder="enter valid organization name*" />             </fieldset>              <fieldset class="form-group">               description<input class="form-control"                 formcontrolname="orgdescription"                 type="text"                 placeholder="what's powerplant about?" />             </fieldset>              <fieldset class="form-group">               minimum power in kw<input class="form-control"                 formcontrolname="minpower"                 type="text"                 placeholder="minimum power capacity in kw" />               maximum power in kw<input class="form-control"                 formcontrolname="maxpower"                 type="text"                 placeholder="maximum power capacity in kw" />             </fieldset>              <fieldset class="form-group">               <textarea class="form-control"                 formcontrolname="body"                 rows="8"                 placeholder="write article (in markdown)">               </textarea>             </fieldset>              <fieldset class="form-group">               <input class="form-control"                 type="text"                 placeholder="enter tags"                 [formcontrol]="tagfield"                 (keyup.enter)="addtag()" />                <div class="tag-list">                 <span *ngfor="let tag of article.taglist"                   class="tag-default tag-pill">                   <i class="ion-close-round" (click)="removetag(tag)"></i>                   {{ tag }}                 </span>               </div>             </fieldset>              <button class="btn btn-lg btn-primary" type="button" (click)="submitform()">               add new powerplant             </button>            </fieldset>         </form>        </div>     </div>   </div> </div> 

in this, want place input types minimum power , maximum power in same line. right come 1 after other. tried adding div input types, did not take effect.

any ideas how place them next each other? closest got reduce size of inout type adding style this:

        <fieldset class="form-group">           minimum power in kw<input class="form-control"             formcontrolname="minpower"             type="text"             placeholder="minimum power capacity in kw" />           maximum power in kw<input class="form-control"             formcontrolname="maxpower"             type="text"             style='width:20em'             placeholder="maximum power capacity in kw" />         </fieldset> 

as can see above, added the

style='width:20em; float:left' 

which sort of got me effect wanted, still not enough!

edit: based on reply use form-inline, here screenshot of get: enter image description here

edit 2: here how new layout looks update answers below:

enter image description here

input field default has display property of block means cannot put element right next . other element start @ next line. can set display property of input inline html

<label>minimum  power</label> <input class="inline" type="number"> <label>maximum power</label> <input class="inline" type="number"> 

css

.inline{ display : inline; } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -