Bootstrap 3
In BS3 as the flex is not native you can build the styles in hand. See how it looks in the example below.
.permissoes {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.permissoes button {
flex: 1;
margin: 6px;
}
<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<div class="container">
<div class="row">
<div class="permissoes col-xs-12 ">
<button onclick="mostrar_form_alunos()" class="btn btn-info btnSpace m-1 " type="button">Permissões de alunos </button>
<button onclick="mostrar_form_professores()" class="btn btn-info btnSpace m-1" type="button">Permissões de professores </button>
<button onclick="mostrar_form_funcionarios()" class="btn btn-info btnSpace m-1" type="button">Permissões de funcionários </button>
<button onclick="mostrar_form_curso()" class="btn btn-info btnSpace m-1" type="button">Permissões de curso </button>
<button onclick="mostrar_form_geral_de_professores()" class="btn btn-info btnSpace m-1" type="button">Permissões geral de professores </button>
<button onclick="mostrar_form_geral_de_funcionarios()" class="btn btn-info btnSpace m-1" type="button">Permissões geral de funcionarios </button>
</div>
</div>
</div>
Bootstrap 4
You do not necessarily need to put the buttons inside the Grid, the fact of placing them inside the Grid is what is making your text pop the btn box, because who determines the width of your btn is the width of the Grid column.
Since Bootstrap 4 has native flex you can only use some original BS4 classes to adjust these buttons etc. In the parent div I put the classes: d-flex justify-content-center flex-wrap
and in btns to do the margins I used the class m-1
Note that there is no CSS in the code below only the native BS4 classes I mentioned above. Note also that as the screen decreases the buttons will "fall" to the bottom line, but when the screen is wide enough everyone will be on the same line!
OBS: You can use a class for example .permissoes button { flex: 1; }
to make btn that break down to bottom line occupy 100% of the screen width.
.permissoes button {
flex: 1;
}
<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />
<div class="container-fluid">
<div class="row">
<div class="permissoes col-12 d-flex justify-content-center flex-wrap">
<button onclick="mostrar_form_alunos()" class="btn btn-info btnSpace m-1 " type="button">Permissões de alunos </button>
<button onclick="mostrar_form_professores()" class="btn btn-info btnSpace m-1" type="button">Permissões de professores </button>
<button onclick="mostrar_form_funcionarios()" class="btn btn-info btnSpace m-1" type="button">Permissões de funcionários </button>
<button onclick="mostrar_form_curso()" class="btn btn-info btnSpace m-1" type="button">Permissões de curso </button>
<button onclick="mostrar_form_geral_de_professores()" class="btn btn-info btnSpace m-1" type="button">Permissões geral de professores </button>
<button onclick="mostrar_form_geral_de_funcionarios()" class="btn btn-info btnSpace m-1" type="button">Permissões geral de funcionarios </button>
</div>
</div>
</div>
See that the screen has to be wide enough to fit all btns in the same line
Which version of Bootstrap?
– hugocsl
Dude why repeat "Permissions on all bikes? If you are already in Session Permissions you can group all these btns inside a box for example and remove the word "Permission" from all btns. I know it doesn’t solve the problem, but it’s a tip
– hugocsl
The text exits the buttons because the buttons have a defined width that is less than the width needed for the text to fit. You can create a custom class in CSS to force text break:
*.btn-wrap-text {
 white-space: normal !important;
 word-wrap: break-word !important;
}
– Tiago Leite
Cara notices that I edited my answer and put the solution to the BS3, Note there that I changed from 'container-Fluid' to just 'container' for you to see how responsive it was etc...
– hugocsl