I
I
Ilya Alekseev2016-01-06 22:28:34
css
Ilya Alekseev, 2016-01-06 22:28:34

How to right-align a button in Bootstrap?

Here I have a form, it is located on the left, you need to make sure that a separate button is placed on the right edge, it does not have to be included in this form.

<div class="container">
  <form class="form-inline" role="form">
  <label class="control-label">e-mail </label>
  <input type="text" name="mail" class="form-control"/>
  <button type="button" class="btn btn-default disabled" id="src">Найти</button>
  !!!!!вот эта кнопка ->>>>><button type="button" class="btn btn-primary">Добавить</button>
  </form>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Perin, 2016-01-06
@ilyaalekseev

Add the pull-right class to the button

D
Denis, 2016-01-06
@72nomer

Or maybe wrap the button in a div with the text-right class?

B
bypcms, 2022-02-22
@bypcms

Bootstrap 4
Using float-sm-right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question