How to place a button that is in the form and in the same row in a table column?

Asked

Viewed 24 times

0

My problem is this: I am wearing bootstrap4 and would like to put the three buttons on the same line. how I proceed?

inserir a descrição da imagem aqui

<td class="col-4">
    <a href="/FAQCategory/{{ $FAQCategory->id }}" class="btn btn-success btn-sm">Detalhar</a>
    <a href="/FAQCategory/{{ $FAQCategory->id }}/edit" class="btn btn-primary btn-sm">Editar</a>
    <form action="FAQCategory/{{ $FAQCategory->id }}" method="post">
        @csrf
        @method('delete')
        <a class="btn btn-danger btn-sm">Apagar</a>
    </form>
</td>
  • the other 2 buttons are only used as links, because it does not put the <form> involving the 3 buttons? and the button "Delete" should set the type <button type="submit"...> to execute the action of <form>

  • Thanks @balexandre. I ended up using d-inline-block in the form class.

1 answer

0


The simplest way would be to apply display: inline-block; form. Once you are using bootstrap, simply apply the class d-inline-block in the form.

I also agree with @balexandre’s suggestion, but would still apply the class form-inline on the form.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.