Creating the layout and style of a modal - css

I am on the way and trying to create a modal's design like this.
Hence I begin by creating a layout first by selecting the elements that I like. However I got a question which is how do I create lines like this? Do I create a fake div so that the lines won't get there?
The lines
HTML
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
New entry
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<span class="tc">New Note</span>
<button type="button" class="close" data-dismiss="modal">Add</button>
</div>
<div class="modal-body">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" autocomplete="off" checked> Note
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2" autocomplete="off"> Image
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3" autocomplete="off"> Voice
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2" autocomplete="off"> Video
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3" autocomplete="off"> Data
</label>
</div>
</div>
<div class="modal-footer">
<div class="input-group">
<span class="input-group-addon">Episode:</span>
<input type="text" class="form-control" placeholder="Choose a episode">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Info</button>
</span>
</div>
<div class="input-group">
<span class="input-group-addon">Episode:</span>
<input type="text" class="form-control" placeholder="Choose a episode">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Info</button>
</span>
</div>
<div class="input-group">
<input type="text" class="form-control" placeholder="Write here">
</div>
</div>
</div>
</div>
</div>
CSS
.tc{
margin-left:192px;}
Thanks for taking your time!

If I fully understanded, correct me if I am wrong, you want something like this:
http://jsfiddle.net/VDesign/9cuxr59y/
CSS Code
.tc{
margin-left:192px;}
.input-group-addon {
background-color: #fff;
border: none;
border-radius: none;
}
.form-control, .form-control:focus {
background-color: #fff;
box-shadow: none;
border: none;
}
.input-group + .input-group {
border-top: 1px solid #ccc;
}
.input-group {
width: 100%;
padding: 7px;
}
.btn-default {
border-radius: 100%;
color: #3071A9;
border: 1px solid #3071A9;
}
.input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
border-bottom-left-radius: 100%;
border-top-left-radius: 100%;
}
.input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group {
margin-left: 0;
}

Related

Add text to navbar Bootstrap 3.3

I am trying to add text to header of jumbotron template:
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Password" class="form-control">
</div>
<button type="submit" class="btn btn-success">Sign in</button>
<p class="navbar-text">Right align-Text</p>
<button type="submit" class="btn btn-success">Sign up</button>
</form>
</div><!--/.navbar-collapse -->
But it is not after Sign in button
I am newbee in html, could you help.
Here you go, https://jsfiddle.net/wttn6sxs/2/
Just add this in your CSS :
.navbar-text {
margin-top: 7.5px;
margin-bottom: 7.5px;
display: inline-block;
float: initial;
}
This will fix your issue.

Bootstrap input group sizes

I'm working on a web page and have some problems with the design, this is the piece of code where I need some help:
<form id="form_articulo_ver" method="post" action="./articulo/articulo_ver.php" role="form" target="frame_articulo_ver">
<div class="input-group col-md-3">
<div class="input-group-btn">
<button class="btn btn-primary" type="button" onClick="busca_referencia()" data-toggle="tooltip" data-placement="top" title="Buscar Referencia"><span class="glyphicon glyphicon-search"></span> </button>
</div>
<input type="text" class="form-control" placeholder="Referencia"/>
<span class="input-group-btn">
<button class="btn btn-success" type="button" onClick="aceptar_referencia()" data-toggle="tooltip" data-placement="top" title="Confirmar Referencia"><span class="glyphicon glyphicon-ok"></span> </button>
</span>
</div>
</form>
<br>
<form id="form_lineas_ref" method="post" action="./articulo/frame_lineas.php" role="form" target="frame_lineas">
<div class="input-group custom-input-group">
<input type="hidden" class="form-control"/>
<span class="input-group-addon">Desc.</span>
<input type="text" class="form-control" placeholder="Descripción"/>
<span class="input-group-addon">Precio</span>
<input type="text" class="form-control" placeholder="Precio"/>
<span class="input-group-addon">Uds.</span>
<input type="text" class="form-control" placeholder="Unidades"/>
<span class="input-group-addon">Dcto. %</span>
<input type="text" class="form-control" placeholder="Descuento"/>
<span class="input-group-addon">Importe</span>
<input type="text" class="form-control" placeholder="Importe"/>
<span class="input-group-addon">€</span>
<div class="input-group-btn">
<button class="btn btn-success" type="button" onClick="aceptar_linea()" data-toggle="tooltip" data-placement="top" title="Añadir linea"><span class="glyphicon glyphicon-ok"></span> </button>
</div>
</div>
</form>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" id="frame_lineas" name="frame_lineas" frameborder="0"></iframe>
</div>
This code looks like this:
But I need "Descripción" input to be larger than the others. I found a css that breaks the input when the screen is smaller, works fine... I don't care if "Descripción" input is same size in lite screen but in large ones need to have more witdh.
Here is the css of the "custom-input-group":
#media (max-width:500px) {
.custom-input-group.input-group .input-group-btn {
width:99%;
display:block;
margin-bottom:5px;
}
.custom-input-group.input-group .input-group-btn .btn {
width: 34%;
}
.custom-input-group.input-group .input-group-btn .btn:last-child {
border-radius:0 4px 4px 0
}
.custom-input-group {
display: block
}
.custom-input-group.input-group .input-group-addon {
clear: both;
display: block;
width: 100%;
border: 1px solid #ccc;
border-radius: 4px;
}
.custom-input-group.input-group .input-group-addon + .form-control {
border-radius: 4px;
margin-bottom: 5px;
}
}
Thank you very much. Sorry for my English.
Hello Just use Size=50 in your input tag .Hope it will help you
<span class="input-group-addon ">Desc.</span>
<input type="text" class="form-control " size="50"
placeholder="Descripción"/>
I suggest you use expanding on click input box for the description.
<div class="container-fluid">
<!--expanding input field -->
<h2 class="timeline-title">Expanding Input (CSS only)</h2>
<p><small class="text-muted">Grows wider when clicked...</small></p>
<input class="form-control input-lg" id="myInput" placeholder="Click here" type="text">
</div>
CSS here.
body {
background-color:#e9e9f4;}
/* expanding input CSS only */ #myInput{ width:130px; -webkit-transition:width 0.3s ease-in-out; } #myInput:focus { width:100%; -webkit-transition:width 0.5s ease-in-out;}
hope this helps

How to make elements in single line?

I use bootstrap in my project.
The width of the area is 350px.
I have this html elements:
<form class="form-inline">
<div class="input-group input-group-sm col-xs-5" >
<input type="text" class="form-control" placeholder="search">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
<div class="input-group input-group-sm">
<select class="form-control" ng-model="" ng-options="">
<option value="">- authority-</option>
</select>
</div>
</form>
Here is plunker.
How can I make search box and dropdown list in one line.
You don't need css to fix this, you can do it with bootstrap styles.
Wrap the form in a 12 wide container (col-lg-12) and wrap each input in a 6 wide container (col-lg-6). (For simplicities sake I only used desktop size in the example)
This would look like:
<div class="col-lg-12">
<!-- start form -->
<div class="col-lg-6">
<!-- input -->
</div>
<div class="col-lg-6">
<!-- input -->
</div>
<!-- end form -->
</div>
That way bootstrap will cut the screen in half (12 / 2 = 6) and put the input box in there.
To make it work with your code have a look at this fiddle
Note I added col-lg, col-md, col-sm and col-xs to make them appear on the same line regardless of screen size.
EDIT:
To put all of this in another panel use:
<div class="panel panel-default">
<div class="panel-body">
<!-- form row -->
</div>
</div>
Working fiddle: http://jsfiddle.net/92z54z04/596/
.input-group are table displayed, so:
.input-group {
display: inline-table;
}
will solve your problem.
JSFiddle
<form class="form-inline">
<div class="form-group" >
<input type="text" placeholder="search"/>
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
<select class="form-group" ng-model="builderStep1.inspectionArchiveData.DomainId" ng-options="item.Id as item.Description for item in builderStep1.lookups.domain">
<option value="">- authority-</option>
</select>
</form>
you can do it with bootstrap easily by using col-xs-6 property
here is the working code:
<form class="form-inline">
<div class="col-xs-6">
<div class="input-group input-group-sm" >
<input type="text" class="form-control" placeholder="search">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="input-group input-group-sm">
<select class="form-control" ng-model="builderStep1.inspectionArchiveData.DomainId" ng-options="item.Id as item.Description for item in builderStep1.lookups.domain">
<option value="">- authority-</option>
</select>
</div>
</div>
</form>
You could extend bootstrap to allow a select element inside your input group.
This depends on your usecase if it is intuitive, but I think this may be a good looking option to evaluate.
You basically copy and paste some of bootstraps style to make the select element fit into a input group.
If you have control over the sass, less files, you may be able to do it cleaner than I did.
.input-group-select:not(:first-child):not(:last-child) {
border-radius: 0;
}
.input-group-select {
position: relative;
width: 1%;
white-space: nowrap;
vertical-align: middle;
display: table-cell;
}
.input-group-select>select {
border-color: #ccc;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 7px;
padding-bottom: 7px;
border-radius: 0;
border-left-width: 0;
}
.input-group-btn:not(:first-child):not(:last-child)>.btn {
border-radius: 0;
border-left-width: 0;
}
.input-group-select:last-child>select {
border-radius: 0 3px 3px 0;
}
.input-group-sm>.input-group-select>select {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />
<form class="form-inline">
<div class="input-group input-group-sm col-xs-5">
<input type="text" class="form-control" placeholder="search">
<div class="input-group-select">
<select ng-model="builderStep1.inspectionArchiveData.DomainId" ng-options="item.Id as item.Description for item in builderStep1.lookups.domain">
<option value="">- authority-</option>
</select>
</div>
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
<div class="input-group input-group-sm col-xs-5">
<input type="text" class="form-control" placeholder="search">
<div class="input-group-select">
<select ng-model="builderStep1.inspectionArchiveData.DomainId" ng-options="item.Id as item.Description for item in builderStep1.lookups.domain">
<option value="">- authority-</option>
</select>
</div>
</div>
<div class="input-group input-group-sm col-xs-5">
<input type="text" class="form-control" placeholder="search">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
<div class="input-group-select">
<select class="select" ng-model="builderStep1.inspectionArchiveData.DomainId" ng-options="item.Id as item.Description for item in builderStep1.lookups.domain">
<option value="">- authority-</option>
</select>
</div>
</div>
</form>
Just use style in div:
display:inline-table;
http://jsfiddle.net/ankitg1602/mqnrmLjb/1/

spread Bootstrap's buttons to 100% of their containing div

How would you let bootstrap self-spread buttons to 100% width of their parent, without adjusting each of the button's width separately ?
for example if i have 8 buttons, 100% containers width / 8 buttons = 12% width for each button.
i would like to:
avoid specifying each button's width (today i got 8 tomorrow i'll
have 20).
adjusting the whole .btn-group's child buttons to the center (if you pay close attention you'll see the buttons inside the container are left-aligned for some reason).
.btn-group {
width: 100%;
}
.btn-group>input.btn {
width: 12%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container panel panel-default">
<div class="btn-group">
<input type="button" class="btn btn-primary btn-responsive" value="A" />
<input type="button" class="btn btn-primary btn-responsive" value="AB" />
<input type="button" class="btn btn-primary btn-responsive" value="ABC" />
<input type="button" class="btn btn-primary btn-responsive" value="ABCD" />
<input type="button" class="btn btn-primary btn-responsive" value="ABCDE" />
<input type="button" class="btn btn-primary btn-responsive" value="ABCD" />
<input type="button" class="btn btn-primary btn-responsive" value="ABC" />
<input type="button" class="btn btn-primary btn-responsive" value="AB" />
</div>
<br/>
<br/>
<br/>
<p>the buttons above don't take full width of the container</p>
</div>
Example CSS:
.btn-group {
width: 100%;
}
.btn-group>input.btn {
width: 12%;
}
Codepen
This effect is easiest achieved with flexbox.
.btn-group {
display: flex;
justify-content: center;
}
.btn-group > input.btn {
flex-grow: 1;
}
Depending on your what browers you target you might want to prefix
HTML added .row inside grid which will allow you to reach 100%.
no I have added .col-xs-12 inside .row which might not be necessary but i have tried to follow what bootstrap gives ie container > row > column.
additions .. make .btn-group to be .btn-block too, it spans it 100%.
<div class="container panel panel-default">
<div class="row">
<div class="col-xs-12 no-padding">
<div class="btn-group btn-block my-btn-group">
<input type="button" class="btn btn-primary btn-responsive" value="A"/>
<input type="button" class="btn btn-primary btn-responsive" value="AB"/>
<input type="button" class="btn btn-primary btn-responsive" value="ABC"/>
<input type="button" class="btn btn-primary btn-responsive" value="ABCD"/>
<input type="button" class="btn btn-primary btn-responsive" value="ABCDE"/>
<input type="button" class="btn btn-primary btn-responsive" value="ABCD"/>
<input type="button" class="btn btn-primary btn-responsive" value="ABC"/>
<input type="button" class="btn btn-primary btn-responsive" value="AB"/>
</div>
</div>
</div>
<br/>
<br/>
<br/>
<p>the buttons above don't take full width of the container</p>
</div>
CSS : i have removed padding from 'column' and removed margin from buttons insided button group
.btn-group>input.btn {
width:12.5%;
}
.no-padding {
padding-left: 0 !important;
padding-right: 0 !important;
}
.my-btn-group .btn+.btn {
margin-left: 0px;
}
If using Flexbox isn't the best option for your use case then you can use a table layout. Another advantage is the control you have with regard to responsive behavior since the default btn-group doesn't offer much in this regard.
These elements behave like <table> HTML elements. It defines a
block-level box.
Basic Example: Run with FullPage
/*Basic Rules*/
.panel-btn {
width: 100%;
display: table;
}
.panel-btn div {
display: table-cell;
}
.panel-btn div .btn {
float: none;
width: 100%;
border-radius: 0;
}
/*Rounded Corner Rules*/
.panel-btn div:first-of-type .btn {
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
}
.panel-btn div:last-of-type .btn {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
}
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container">
<h2>11 Buttons</h2>
<div class="panel panel-default panel-btn">
<div>
<input type="button" class="btn btn-primary" value="A" />
</div>
<div>
<input type="button" class="btn btn-primary" value="AB" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABC" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCD" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEF" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFG" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFGH" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFGHI" />
</div>
<div>
<input type="button" class="btn btn-primary" value="1" />
</div>
<div>
<input type="button" class="btn btn-primary" value="12" />
</div>
<div>
<input type="button" class="btn btn-primary" value="123" />
</div>
</div>
</div>
Responsive Example: Run with FullPage and reduce the browser window
/*Basic Rules*/
.panel-btn {
width: 100%;
display: table;
}
.panel-btn div {
display: table-cell;
}
.panel-btn div .btn {
float: none;
width: 100%;
border-radius: 0;
}
/*Rounded Corner Rules*/
.panel-btn div:first-of-type .btn {
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
}
.panel-btn div:last-of-type .btn {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
}
/*Responsive CSS*/
#media screen and (max-width: 850px) {
.panel-btn div {
width: 50%;
}
.panel-btn div:nth-child(even) {
float: right;
}
.panel-btn div:nth-child(odd) {
float: left;
}
.panel-btn div:last-child:not(:nth-child(even)) {
width: 100%;
display: block;
}
/*Rounded Corner Rules*/
.panel-btn div:first-of-type .btn {
border-bottom-left-radius: 0px;
border-top-left-radius: 4px;
}
.panel-btn div:nth-child(2) .btn {
border-top-right-radius: 4px;
}
.panel-btn div:last-of-type .btn {
border-bottom-right-radius: 4px;
border-top-right-radius: 0px;
}
.panel-btn div:last-child:not(:nth-child(even)) .btn {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.panel-btn div:nth-last-child(2):not(:nth-child(even)) .btn {
border-bottom-left-radius: 4px;
}
}
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="container-fluid">
<h2>11 Buttons</h2>
<div class="panel panel-default panel-btn">
<div>
<input type="button" class="btn btn-primary" value="A" />
</div>
<div>
<input type="button" class="btn btn-primary" value="AB" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABC" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCD" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEF" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFG" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFGH" />
</div>
<div>
<input type="button" class="btn btn-primary" value="ABCDEFGHI" />
</div>
<div>
<input type="button" class="btn btn-primary" value="1" />
</div>
<div>
<input type="button" class="btn btn-primary" value="12" />
</div>
<div>
<input type="button" class="btn btn-primary" value="123" />
</div>
</div>
<br/>
<h2>10 Buttons</h2>
<div class="panel panel-default panel-btn">
<div>
<input type="button" class="btn btn-danger" value="123456789" />
</div>
<div>
<input type="button" class="btn btn-danger" value="12345678" />
</div>
<div>
<input type="button" class="btn btn-danger" value="1234567" />
</div>
<div>
<input type="button" class="btn btn-danger" value="123456" />
</div>
<div>
<input type="button" class="btn btn-danger" value="12345" />
</div>
<div>
<input type="button" class="btn btn-danger" value="1234" />
</div>
<div>
<input type="button" class="btn btn-danger" value="123" />
</div>
<div>
<input type="button" class="btn btn-danger" value="12" />
</div>
<div>
<input type="button" class="btn btn-danger" value="1" />
</div>
<div>
<input type="button" class="btn btn-danger" value="A" />
</div>
</div>
<br/>
<h2>9 Buttons</h2>
<div class="panel panel-default panel-btn">
<div>
<input type="button" class="btn btn-success" value="A" />
</div>
<div>
<input type="button" class="btn btn-success" value="AB" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABC" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABCD" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABCDEF" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABCDEFG" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABCDEFGH" />
</div>
<div>
<input type="button" class="btn btn-success" value="ABCDEFGHI" />
</div>
<div>
<input type="button" class="btn btn-success" value="1" />
</div>
</div>
<br/>
<h2>20 Buttons</h2>
<div class="panel panel-default panel-btn">
<div>
<input type="button" class="btn btn-warning" value="1" />
</div>
<div>
<input type="button" class="btn btn-warning" value="2" />
</div>
<div>
<input type="button" class="btn btn-warning" value="3" />
</div>
<div>
<input type="button" class="btn btn-warning" value="4" />
</div>
<div>
<input type="button" class="btn btn-warning" value="5" />
</div>
<div>
<input type="button" class="btn btn-warning" value="6" />
</div>
<div>
<input type="button" class="btn btn-warning" value="7" />
</div>
<div>
<input type="button" class="btn btn-warning" value="8" />
</div>
<div>
<input type="button" class="btn btn-warning" value="9" />
</div>
<div>
<input type="button" class="btn btn-warning" value="10" />
</div>
<div>
<input type="button" class="btn btn-warning" value="11" />
</div>
<div>
<input type="button" class="btn btn-warning" value="12" />
</div>
<div>
<input type="button" class="btn btn-warning" value="13" />
</div>
<div>
<input type="button" class="btn btn-warning" value="14" />
</div>
<div>
<input type="button" class="btn btn-warning" value="15" />
</div>
<div>
<input type="button" class="btn btn-warning" value="16" />
</div>
<div>
<input type="button" class="btn btn-warning" value="17" />
</div>
<div>
<input type="button" class="btn btn-warning" value="18" />
</div>
<div>
<input type="button" class="btn btn-warning" value="19" />
</div>
<div>
<input type="button" class="btn btn-warning" value="20" />
</div>
</div>
</div>

Bootstrap text field next to other inputs, using whole width

I want to have a form, containing a checkbox, a textfield and a button, with textfield taking as much width as available.
Is that possible?
<form>
<input type="checkbox">
<input class='form-control'>
<button class="btn btn-danger pull-right">
<i class="glyphicon glyphicon-minus"></i>
</button>
</form>
Here's a codepen with my (failed) intent
EDIT: Changed my question to not require form-inline to achieve the same result
You can use calc() in input="text" and according to Bootstrap Docs Examples the button would be a sibling of form-group and not a child as you have.
Remember that .form-inline only applies to forms within viewports that are at least 768px wide. So you need to see full-page of the snippet.
.form-group {
border: red solid
}
input[type="text"] {
width: calc(100% - 17px)
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<form class="form-inline">
<div class="form-group">
<input type="checkbox">
<input type="text" placeholder="textfield">
</div>
<button type="submit" class="btn btn-default">
Remove<i class="glyphicon glyphicon-minus"></i>
</button>
</form>
UPDATE (based on your updated question) - that you want the same outcome even for smaller screen - therefore don't require form-inline)
I'll say lets keep form-inline but make button child of form-group instead of sibling (as I had earlier in my answer - and as it should be accordingly to Bootstrap Docs Examples)
.form-group {
border: red solid
}
#f1 input[type="text"] {
width: calc(100% - 113px) /* regular button */
}
#f2 input[type="text"] {
width: calc(100% - 101px) /* small button */
}
#f3 input[type="text"] {
width: calc(100% - 91px) /* extra small button */
}
#f4 input[type="text"] {
width: calc(100% - 141px) /* large button */
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<form id="f1" class="form-inline">
<div class="form-group">
<input type="checkbox">
<input type="text" placeholder="textfield">
<button type="submit" class="btn btn-default">
Remove<i class="glyphicon glyphicon-minus"></i>
</button>
</div>
</form>
<form id="f2" class="form-inline">
<div class="form-group">
<input type="checkbox">
<input type="text" placeholder="textfield">
<button type="submit" class="btn btn-sm btn-default">
Remove<i class="glyphicon glyphicon-minus"></i>
</button>
</div>
</form>
<form id="f3" class="form-inline">
<div class="form-group">
<input type="checkbox">
<input type="text" placeholder="textfield">
<button type="submit" class="btn btn-xs btn-default">
Remove<i class="glyphicon glyphicon-minus"></i>
</button>
</div>
</form>
<form id="f4" class="form-inline">
<div class="form-group">
<input type="checkbox">
<input type="text" placeholder="textfield">
<button type="submit" class="btn btn-lg btn-default">
Remove<i class="glyphicon glyphicon-minus"></i>
</button>
</div>
</form>
Try this:
<div class="container">
<div class="input-group">
<input type="text" class="form-control">
<div class="input-group-btn">
<button type="button" class="btn btn-default">
<input type="checkbox">
</button>
<button type="button" class="btn btn-danger"><i class="glyphicon glyphicon-minus"></i></button>
</div>
</div>
</div>

Resources