html - Bootstrap 3 Autosizing Inline Inputs with Small Column -


i attempting create inline form within small container (.col-sm-4). using default inline form @ size automatically wraps multiple lines, avoid. aiming here: desired layout

at point have gotten inputs throw out min-width , instead adhere bounding columns, cannot button in spot want (and autosizing overarching container).

jsfiddle here

html:

<div class="col-xs-4 well">     <div class="col-xs-7 form-col" id="input-dynamic">         <input type="text"></input>     </div>     <div class="col-xs-4 form-col" id="input-dynamic">         <div class="input-group-addon">$</div>         <input type="number"></input>     </div>     <div class="col-xs-1 form-col" id="input-dynamic">         <button class="btn btn-danger">-</button>     </div> </div> 

css:

#input-dynamic input[type=text] {     width: 100%;     box-sizing: border-box;     height: 28px; } #input-dynamic input[type=number] {     width: 100%;     box-sizing: border-box;     height: 28px; } #input-dynamic button {     width: 100%;     box-sizing: border-box;     height: 28px; } .form-col {     padding-right: 2px;     padding-left: 2px; } 

i forked jsfiddle.

i implemented inline-form techniques discussed here.

and built of elements using bootstrap form builder. if google bootstrap form builder see many similar ones.

i noticed didn't add external resources jsfiddle did well.

if have really small screen gets scrunched use media query discussed here change layout small width.

<div class="container-fluid">     <div class="row">         <div class="col-xs-4">             <form class="form-inline">                 <div class="form-group">                     <div class="row">                         <div class="col-xs-6">                             <input id="textinput" name="textinput" type="text" class="form-control input-md"></div>                             <div class="col-xs-6"><div class="input-group"> <span class="input-group-addon">$</span>                                  <input id="prependedtext" name="prependedtext" class="form-control" placeholder="amount" type="text"> <span class="input-group-btn">         <button class="btn btn-danger" type="button">-</button>       </span>                              </div>                         </div>                     </div>             </form>             </div>         </div>     </div> 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -