Tuesday, October 15, 2013

Bootstrap 3 input-append fix

Remove input-prepend and input-append for singular `.input-group`. The classes have changed for the elements within, and require a bit more markup to use buttons:
- Use `.input-group` as the parent class around the input and addon.
- For text based prepends/appends, use `.input-group-addon` instead of `.addon`.
- For button prepends/appends, use `.input-group-btn` and place your `.btn` within that element.
<div class="container">
  <div class="row">
    <div class="col-sm-3 col-xs-12 col-lg-3">
      <form class="form-search">
          <div class="input-group">
              <input type="text" class="form-control " placeholder="Text input">
              <span class="input-group-btn">
                  <button type="submit" class="btn btn-search">Search</button>
Source: http://stackoverflow.com/a/18358354

No comments:

Post a Comment