1
I have this table
<div class="container">
<div class="row">
<div class="col-md-12">
<table class="table table-striped table-bordered">
<caption>Lista de Tipo de Campos</caption>
<thead class="thead-dark">
<tr>
<th>Nome</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let typefield of dataSource">
<div *ngIf="typefield.edit!=true">
<td class="col-md-10">{{ typefield.name }}</td>
<td class="col-md-1">
<fa *ngIf="checkEdit()" name="pencil" (click)="initEditTypeField(typefield)"></fa>
</td>
<td class="col-md-1">
<fa *ngIf="checkEdit()" name="times" (click)="onDelete(typefield)"></fa>
</td>
</div>
<form [formGroup]="createForm" *ngIf="typefield.edit === true">
<td class="col-md-6"> {{ typefield.typefieldId}}<input formControlName="id" type="hidden" class="col-md-1"></td>
<td> <input formControlName="name" type="text"></td>
<td class="col-md-1">
<fa name="save" (click)="onUpdate()"></fa>
</td>
<td class="col-md-1">
<fa name="ban" (click)="typefield.edit = null; initDefaultForm();"></fa>
</td>
</form>
</tr>
</tbody>
</table>
<div>
<input type="button" class="btn btn-success pull-right" value="+">
</div>
</div>
</div>
</div>
At the end of it there is a value button = "+"; How do I get this button to be aligned at the end of the table on the right.
Young semantically the syntax of your table is quite wrong... you should not put div or form encompassing several
TDs
when so, place the Dive or the form inside the TD. I tested your code here on Bootstrap 3, and apparently btn is getting to the right of the table normally...– hugocsl
@hugocsl, not staying. He’s getting right, outside the table area. What I would like to do is put it to the board, but right below the dividing line of the table.
– pnet
See that I have a caption Field Type List of Fields, only aligned to the left. I would like to place the button at the other end, but in the same direction as the caption, and under the table.
– pnet
I think I got it, you want it in the same "line" where it is Field Type List of Fields at the end of this line is btn with + is that it? You are using Bootstrap 3 or 4?
– hugocsl
That’s right, @hugocsl. We’re using 4
– pnet