Align Buttons Side by Side Bootstrap
You can use an out div with a class btn-group
. This helps to align the buttons horizontally. Using col-md-6
for each button div can make the buttons missaligned with unwanted space in between.
<div class="btn-group">
<a href="#" class="btn btn-warning">Talent-signup to find jobs</a>
<a href="#" class="btn btn-success">Talent-signup to find jobs</a>
</div>
Try this for Bootstrap 4.Worked for me
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" class="btn btn-secondary">Left</button>
<button type="button" class="btn btn-secondary">Middle</button>
</div>
1) use display: inline-block
#btnSearch,
#btnClear{
display: inline-block;
vertical-align: top;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-sm-12 text-center">
<button id="btnSearch" class="btn btn-primary btn-md center-block" Style="width: 100px;" OnClick="btnSearch_Click" >button</button>
<button id="btnClear" class="btn btn-danger btn-md center-block" Style="width: 100px;" OnClick="btnClear_Click" >button</button>
</div>
</div>
or
2) remove class .center-block
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-sm-12 text-center">
<button class="btn btn-primary btn-md">button</button>
<button class="btn btn-danger btn-md">button</button>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-xs-6">
<button class="btn btn-warning btn-block">Talent-signup to find jobs</button>
</div>
<div class="col-xs-6">
<button class="btn btn-success btn-block">Employers- signup to hire talent</button>
</div>
</div>