Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To include a button next to the search box in a Bootstrap 3 table, follow these steps:

  1. Add a parent div with the input-group class:
<div class="input-group">
  1. Add the search box input element with the form-control class inside the div:
<input class="form-control" type="text" placeholder="Search...">
  1. Add the button span element with the input-group-btn class after the input element:
<span class="input-group-btn">
  <button class="btn btn-default" type="button">Go</button>
</span>
  1. Close the parent div:
</div>

The complete code would look like this:

<div class="input-group">
  <input class="form-control" type="text" placeholder="Search...">
  <span class="input-group-btn">
    <button class="btn btn-default" type="button">Go</button>
  </span>
</div>