I have six buttons underneath an alert, why are they so spaced out? This is what they look like in a normal browser, and this is what I'd like them to look like.
#import url(http://fonts.googleapis.com/css?family=Cabin|Lobster);
#import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css);
html, body { background-color: #108A93; }
.row { text-align: center; }
.header { font-family: "lobster", arial; }
.alert-info { background-color: #4D3A7D; border: none; color: white; }
.disabled { cursor: default; }
.btn-default { color: #444; }
span, p, h1, strong, button { color: white; }
span, p, button { font-family: "Cabin", arial; }
button { border: none; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-xs-4"> <button class="btn btn-primary btn-block">Scrounge Cash</button> </div>
<div class="col-xs-4"> <button class="btn btn-default btn-block">$0.00</button> </div>
<div class="col-xs-4"> <button class="btn btn-default btn-block">$0.00/s</button> </div>
</div>
<div class="row">
<div class="row">
<div class="col-xs-4"> <button class="btn btn-primary btn-block">Pray to Demeter</button> </div>
<div class="col-xs-4"> <button class="btn btn-default btn-block">0</button> </div>
<div class="col-xs-4"> <button class="btn btn-default btn-block">0/s</button> </div>
</div>
</div>
</div>
</div>
There is a padding on boostrap by default, 15px from each side. adding the class no-padding solve the gap.
#import url(http://fonts.googleapis.com/css?family=Cabin|Lobster);
#import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css);
html, body { background-color: #108A93; }
.row { text-align: center; }
.header { font-family: "lobster", arial; }
.alert-info { background-color: #4D3A7D; border: none; color: white; }
.disabled { cursor: default; }
.btn-default { color: #444; }
span, p, h1, strong, button { color: white; }
span, p, button { font-family: "Cabin", arial; }
button { border: none; }
.no-padding{padding:0; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="row">
<div class="col-xs-4 no-padding"> <button class="btn btn-primary btn-block">Scrounge Cash</button> </div>
<div class="col-xs-4 no-padding"> <button class="btn btn-default btn-block">$0.00</button> </div>
<div class="col-xs-4 no-padding"> <button class="btn btn-default btn-block">$0.00/s</button> </div>
</div>
<div class="row">
<div class="col-xs-4 no-padding"> <button class="btn btn-primary btn-block">Pray to Demeter</button> </div>
<div class="col-xs-4 no-padding"> <button class="btn btn-default btn-block">0</button> </div>
<div class="col-xs-4 no-padding"> <button class="btn btn-default btn-block">0/s</button> </div>
</div>
</div>
</div>
</div>
Related
I'm struggling to stretch the left navigation section to reach the bottom of the page and stay responsive. I'm using Bootstrap 5.2.0. I tried many solutions like h-100, flex-grow, min-vh-100m self-align: stretch. Nothing seems to do the trick.
Codepen: (You may have to increase the height of the output window to see what I mean) :
https://codepen.io/ma66ot/pen/KKQZXew
HTML
<div class="col-md-3 col-lg-2">
<div class="logo">
<div>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Circle_-_black_simple.svg/300px-Circle_-_black_simple.svg.png" id="circle" alt="">
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="navigation ">
<div class="title-nav">
<img src="./assets/verwaltung.png" alt="" id="verwaltung-logo">
</div>
<div class="button-container">
<ul>
<li><button type="button" class="btn btn-primary btn-lg btn-block">Übersicht</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">TrainerInnen</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">TeilnehmerInnen</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">Gruppen</button></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9 col-lg-10">
<div class="mainfenster">
</div>
</div>
</div>
</div>
</div>
CSS
h2 {
width:100%;
}
html button {
border: 0;
width: 100%;
}
html ul {
list-style-type: none;
padding: 0;
margin: 0;
}
html .container-fluid {
padding: 1em;
}
#circle{
width: 100%;
height: 100%;
}
#verwaltung-logo {
width: 50%;
height: 50%;
}
html .links {
padding-right: 3em;
}
/* Navigation */
html .navigation {
background: #FFA500;
border-radius: 48px;
padding: 1em;
margin-top: 1em;
}
li {
margin-top: 1em;
margin-bottom: 1em;
}
.button-container{
width: 80%;
margin: auto;
}
.navigation a {
color: white;
text-decoration: none;
}
.mainfenster {
background: #FF6E13;
border-radius: 48px;
overflow-y: scroll;
height: calc(100vh - 2em);;
}
/* Hide scrollbar for Chrome */
.mainfenster::-webkit-scrollbar {
display: none;
}
.mainfenster {
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.mainfenster button {
border-radius: 10px !important;
}
As explained here anytime you want to fill or stretch the remaining height flexbox column direction and flex grow.
make the left column viewport height and use min-vh-100
also make the left column d-flex flex-column
use flex-grow-1 on the div you want to fill the remaining column height
finally, use h-100 on the navigation so it fills the height of its' parent
https://codeply.com/p/CqV3FF1x5L
<div class="container-fluid ">
<div class="row">
<div class="col-md-3 col-lg-2 min-vh-100 d-flex flex-column">
<div class="logo">
<div>
<img ...>
</div>
</div>
<div class="row flex-grow-1">
<div class="col-md-12">
<div class="navigation h-100">
<div class="title-nav">
<img .. >
</div>
<div class="button-container">
<ul>
<li><button type="button" class="btn btn-primary btn-lg btn-block">Übersicht</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">TrainerInnen</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">TeilnehmerInnen</button></li>
<li><button type="button" class="btn btn-primary btn-lg btn-block">Gruppen</button></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9 col-lg-10">
<div class="mainfenster">
</div>
</div>
</div>
</div>
First you need to fix height of left logo after that you need to add height to .navigation class and minus height of logo. see the below exmple
html .navigation {
height: calc(100vh - 200px);
}
In this above case your logo div height 200px.
I'm using bootstrap 3 modals, the design I've been asked to do is
Notice how the graphic designer placed a button vertically aligned with the start of the text and another vertically aligned with the end of the text.
My code is
<div class="fr-popup-title">
<div class="modal-title">
<div class="row fr-title-popup-margin">
<?php echo $question_title; ?>
</div>
<div class="row">
<?php echo $you_know; ?>
</div>
<div class="row">
<?php echo $migrant; ?>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-4 pl col-md-push-2">
<button type="button" class="btn btn-warning modal-fr-btn yes-fr-popup" data-dismiss="modal">
<?php echo $yes; ?>
</button>
</div>
<div class="col-xs-4 btn-col pr col-md-push-3">
<button type="button" class="btn btn-warning modal-fr-btn close-fr-popup" data-dismiss="modal">
<?php echo $no; ?>
</button>
</div>
</div>
I get what I want but not the alignment I want, if I add some margins, it will break on another screen, what's the best way to solve it?
Please note that I tried inserting all my code as a snippet and it made more mess than the real deal, don't use the snippet as a reference, my code in a browser is way better, and don't worry about my classes, they seem like a lot but all of them are useless, they are nothing but a failed attempt at aligning.
The one without snippet is the same but easier to read.
$(window).on('load', function () {
$('#francepopup').modal('show');
});
.fr-title-popup-margin {
margin-top: 20px;
}
.fr-popup-title {
font-size: 24px;
font-family: 'Montserrat', sans-serif;
color: #008cc0;
font-weight: 800;
text-align: center;
}
.modal-fr-btn {
border-radius: 40px;
height: 25px;
width: 80px;
font-size: 14px;
font-family: 'Montserrat', sans-serif;
color: white;
font-weight: 800;
}
.dont {
font-family: 'Montserrat', sans-serif;
font-weight: 400;
font-size: 6px;
}
.fr-flags {
margin: 0 auto;
}
.fr-text {
margin: 0 auto 0 3px
}
#media (min-width: 992px) {
.modal-dialog {
width: 30%;
}
}
#media (max-width: 991px) {
.pr {
float: right;
}
.pl {
float: left;
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<body>
<div class="modal fade" id="francepopup" role="dialog">
<div class="modal-dialog modal-md">
<!-- Modal content-->
<div class="modal-content">
<button type="button" class="close close-fr-popup" data-dismiss="modal">×</button>
<div class="fr-popup-title">
<div class="modal-title">
<div class="row fr-title-popup-margin">
Are you or is someone
</div>
<div class="row">
you know
</div>
<div class="row">
a migrant in France?
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-4 pl col-md-push-2">
<button type="button" class="btn btn-warning modal-fr-btn yes-fr-popup" data-dismiss="modal">
Yes
</button>
</div>
<div class="col-xs-4 btn-col pr col-md-push-3">
<button type="button" class="btn btn-warning modal-fr-btn close-fr-popup" data-dismiss="modal">
No
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
i simply edited your code and i hope it is what you really needed :)
$(window).on('load', function () {
$('#francepopup').modal('show');
});
.fr-title-popup-margin {
margin-top: 20px;
}
.fr-popup-title {
font-size: 23px;
font-family: 'Montserrat', sans-serif;
color: #008cc0;
font-weight: 800;
/*text-align: center;*/
}
.modal-fr-btn {
border-radius: 40px !important;
/*height: 25px;*/
width: 80px;
font-size: 14px;
font-family: 'Montserrat', sans-serif;
color: white;
font-weight: 800;
}
.dont {
font-family: 'Montserrat', sans-serif;
font-weight: 400;
font-size: 6px;
}
.fr-flags {
margin: 0 auto;
}
.fr-text {
margin: 0 auto 0 3px
}
#media (min-width: 992px) {
.modal-dialog {
width: 30%;
}
}
#media (max-width: 991px) {
.pr {
float: right;
}
.pl {
float: left;
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<body>
<div class="modal fade" id="francepopup" role="dialog">
<div class="modal-dialog modal-md">
<!-- Modal content-->
<div class="modal-content">
<button type="button" class="close close-fr-popup" data-dismiss="modal">×</button>
<div class="fr-popup-title">
<div class="modal-title">
<div style="display:flex">
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
<div style="max-width:49.33333333%; text-align:center">
Are you or is someone <br/>
you know <br/>
a migrant in france?
</div>
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
</div>
</div>
</div>
<div class="modal-body">
<div style="display:flex">
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
<div style="max-width:49.33333333%; flex: 0 0 49.33333333%">
<button type="button" style="float:left; width:115px; height:40px; font-size:18px" class="btn btn-warning modal-fr-btn yes-fr-popup" data-dismiss="modal">
Yes
</button>
<button type="button" style="float:right;width:115px; height:40px; font-size:18px" class="btn btn-warning modal-fr-btn close-fr-popup" data-dismiss="modal">
No
</button>
</div>
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
</div>
<br/>
<div style="display:flex">
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
<div style="max-width:49.33333333%; flex: 0 0 49.33333333%; text-align:right; margin-top:-15px">
(Please dont ask <br/> me this again)
</div>
<div style="max-width:25.33333333%; flex: 0 0 25.33333333%;"></div>
</div>
</div>
</div>
</div>
</div>
</body>
I have a grid created using bootstrap 3 divs. The collection of divs has 1 button, followed by a radio button, followed by another button. I would like to highlight these with a background color. The background color should not break in between and should be like a single row.
Here is the fiddle with my attempt - https://jsfiddle.net/oxfqvtds/2/
In this, there is some empty space on the bottom right side of the div. As a result, the highlighting is not consistent.
.highlight {
background-color: yellow;
}
.input-field {
height: 20px;
padding: 2px 10px;
}
.custom-label {
line-height: 3.3em !important;
}
.label-size {
font-size: 10px;
line-height: 2.1em;
}
label {
padding-right: 0px;
}
<head>
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
</head>
<body>
<div class="container-fluid">
<form class="form-horizontal">
<div class="col-md-12">...</div>
<div class="col-md-12">...</div>
<div class="col-md-10 highlight">
<div class="form-group">
<div class="col-md-3">
<button class="btn btn-primary btn-xs" type="button">Test</button>
</div>
<label class="col-md-2 label-size">Options</label>
<div class="radio" class="col-md-7 label-size">
<label class="label-size">
<input type="radio" name="opt" value="opt" >opt</label>
</div>
</div>
</div>
<div class="col-md-2 highlight form-group">
<button class="btn btn-info btn-xs pull-right">Test2</button>
</div>
</form>
</div>
</body>
Also, would like to have the buttons/radio buttons centered in the highlighted area. Right now they seem to be towards the top of the highlighted area.
With bootstrap you columns should be in a row. Apply the background color to the row once you have it in place. Remove form-groups, and you had class listed twice around the radio element so it wasn't reading the bootstrap column class.
.highlight.row {
background-color: yellow;
margin:0;
}
.input-field {
height: 20px;
padding: 2px 10px;
}
.custom-label {
line-height: 3.3em !important;
}
.label-size {
font-size: 10px;
line-height: 2.1em;
}
label {
padding-right: 0px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid">
<div class="row highlight">
<form class="form-horizontal">
<div class="col-md-10 ">
<div class="">
<div class="col-md-3">
<button class="btn btn-primary btn-xs" type="button">Test</button>
</div>
<div class="col-md-2">
<label class="label-size">Options</label>
</div>
<div class="col-md-5 label-size">
<label class="label-size">
<input type="radio" name="opt" value="opt" >opt</label>
</div>
</div>
</div>
<div class="col-md-2">
<button class="btn btn-info btn-xs pull-right">Test2</button>
</div>
</form>
</div>
</div>
remove the margin-bottom from this particular form-group
I am not able to align the text inside the buttons vertically using the vertical-align:middle style as used in vertical alignment of text and icon in bootstrap button
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="page-header">
<div class="row">
<div class ="col-md-3">
<h3 class="text-center" id="title">Kartikey</h3>
</div>
<div class ="col-md-1 col-md-offset-3" >
<button type="button" class="btn btn-default" ><h3 style="vertical-align:middle;">About</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Portfolio</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Contact</h3></button>
</div>
<div class="col-md-3">
</div>
</div>
</div>
</body>
Here's my code :
http://codepen.io/kartikeykant/pen/VPeWYN
.page-header{
height: 100px;
background-color: rgb(112, 137, 142);
margin-top: 0px;
}
#title{
font-size:400%;
color: white;
}
.btn{
margin-top:24px;
margin-right:50px;
margin-left:50px;
width:110px;
height:55px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="page-header">
<div class="row">
<div class ="col-md-3">
<h3 class="text-center" id="title">Kartikey</h3>
</div>
<div class ="col-md-1 col-md-offset-3" >
<button type="button" class="btn btn-default" ><h3 style="vertical-align:middle;">About</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Portfolio</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Contact</h3></button>
</div>
<div class="col-md-3">
</div>
</div>
</div>
</body>
Also the result in the code snipppet and codepen are different. How is it so?
Just use a margin:0 auto on your h3 tags.
.page-header{
height: 100px;
background-color: rgb(112, 137, 142);
margin-top: 0px;
}
#title{
font-size:400%;
color: white;
}
.btn{
margin-top:24px;
margin-right:50px;
margin-left:50px;
width:110px;
height:55px;
}
.btn h3{
margin:0 auto;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="page-header">
<div class="row">
<div class ="col-md-3">
<h3 class="text-center" id="title">Kartikey</h3>
</div>
<div class ="col-md-1 col-md-offset-3" >
<button type="button" class="btn btn-default" ><h3 style="vertical-align:middle;">About</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Portfolio</h3></button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default"><h3 style="vertical-align:middle;">Contact</h3></button>
</div>
<div class="col-md-3">
</div>
</div>
</div>
</body>
vertical-align:middle didn't work for me either. I ended up using flex.
In Bootstrap 4 this is just a matter of using the flex classes:
<div class="col-md-1">
<button type="button" class="btn btn-default d-flex align-items-middle justify-content-center">
<h3 class="m-0">Contact</h3>
</button>
</div>
If you are still stuck with Bootstrap 3, you can create your own class:
CSS:
.valign-content {
display:flex;
align-items: center;
justify-content: center;
}
.valign-content>h3 {
margin:0;
}
HTML
<div class="col-md-1">
<button type="button" class="btn btn-default valign-content">
<h3>Contact</h3>
</button>
</div>
Note that you need to remove margin from the h3 tags i both cases.
The margin-top: 20px; in class h3 pushes it down. Try troubleshooting it using F12 tools.
You are using <h3> inside <button>, is not "correct", remove <h3> and add "font-size: 24px;" in the ".btn" class.
.page-header{
height: 100px;
background-color: rgb(112, 137, 142);
margin-top: 0px;
}
#title{
font-size:400%;
color: white;
}
.btn {
margin-top:24px;
margin-right:50px;
margin-left:50px;
width:110px;
height:55px;
font-size: 24px;
}
<head>
</head>
<body>
<div class="page-header">
<div class="row">
<div class ="col-md-3">
<h3 class="text-center" id="title">Kartikey</h3>
</div>
<div class ="col-md-1 col-md-offset-4" >
<button type="button" class="btn btn-default" >About</button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default">Portfolio</button>
</div>
<div class="col-md-1">
<button type="button" class="btn btn-default">Contact</button>
</div>
<div class="col-md-2">
</div>
</div>
</div>
</body>
I'm using bootstrap classes to arrange my page, and it was going fine until my latest row:
#* row 7: Copy, Excel, CSV, and PDF buttons *#
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-8">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-1">
<label style="text-align: right;">Search:</label>
</div>
<div class="col-md-1">
<input type="text" style="margin-right: 2cm;" name="searchinput">
</div>
<div class="col-md-1">
</div>
</div>
That row is preceded and followed by rows like this:
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
I need the input text to shift to the left, away from the right border, and closer to the "Search" label.
How can I accomplish this?
I also don't know why the row is so tall, making the buttons overly tall - or why the buttons are so tall, making the row tall...
The css used is:
.squishedbutton {
border: none;
margin-left: 0cm;
padding: 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
}
UPDATE
This is how it looks now:
...with this html:
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-7">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-1">
<label style="text-align: right; display: inline-block;">Search:</label>
</div>
<div class="col-md-1">
<input type="text" style="margin-right: 2cm;" name="searchinput">
</div>
</div>
...and this css:
.squishedbutton {
margin-left: 0cm;
margin-right: -0.1cm;
padding: 4px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
}
IOW, it looks more-or-less "okay" but I would like the input text shifted to the left and/or the label shifted to the right so that they appear a little more "cozy"
.squishedbutton {
border: none;
margin-left: 0cm;
padding:0 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<style>
hr{ margin:0;}
</style>
<div class="container">
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-7">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-3 ">
<form class="form-inline">
<div class="form-group">
<label for="exampleInputName2">Search</label>
<input type="text" class="" id="exampleInputName2" placeholder="">
</div>
</form>
</div>
<div class="col-md-1">
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
</div>
and if you want label and text to come next to buttons then place them just after buttons.
UPD. There are three rows in the code below:
Original CSS from the answer.
Shift <label> to right.
Place <label> and <input> in the same column.
Does something look as you need?
#import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css');
#media (min-width: 992px) {
h2 {
margin: 0;
padding: 10px 0 0 0;
}
/* 1. */
.shift-to-right {
padding-right: 0;
text-align: right;
}
/* 2. */
.make-them-closer {
padding-top: 13px;
}
.make-them-closer label {
float: left;
padding-right: 4px;
padding-top: 3px;
}
.make-them-closer div {
overflow: hidden;
}
.make-them-closer input {
width: 100%;
}
}
.squishedbutton {
border: none;
margin-left: 0cm;
padding: 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
}
<div class="container-fluid">
<div class="row">
<div class="col-md-12"><hr /></div>
<div class="col-md-1">
<h2>0.</h2>
</div>
<div class="col-md-7">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-1">
<label style="text-align: right; display: inline-block;">Search:</label>
</div>
<div class="col-md-1">
<input type="text" style="margin-right: 2cm;" name="searchinput">
</div>
<div class="col-md-12"><hr /></div>
<div class="col-md-1">
<h2>1.</h2>
</div>
<div class="col-md-7">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-1 shift-to-right">
<label>Search:</label>
</div>
<div class="col-md-1">
<input type="text" name="searchinput">
</div>
<div class="col-md-12"><hr /></div>
<div class="col-md-1">
<h2>2.</h2>
</div>
<div class="col-md-7">
<button type="button" class="squishedbutton">Copy</button>
<button type="button" class="squishedbutton">Excel</button>
<button type="button" class="squishedbutton">CSV</button>
<button type="button" class="squishedbutton">PDF</button>
</div>
<div class="col-md-2 make-them-closer">
<label>Search:</label>
<div><input type="text" name="searchinput"></div>
</div>
<div class="col-md-12"><hr /></div>
</div>
</div>