これは大きなテーブルの一部です。私は3つのフィールドを持っていて、それぞれのフィールドには削除ボタンが並んでいなければなりません。行内の多くの入力の隣にボタンを配置する
CSSは最初のボタンだけを整列させ、他のボタンは同じ位置に配置しています。他の2つのボタンをフィールドの隣に配置するにはどうすればいいですか?
ありがとうございます!
td .btn.aligned {
position: absolute;
margin-top: 7px;
float: right;
margin-left: 5px;
}
td input {
float: left;
margin-bottom: 10px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://use.fontawesome.com/a06b1c7829.js"></script>
<table id="tablaProveedores" class="table table-hover">
<thead class="thead-inverse">
<th>Phone numbers</th>
</thead>
<tbody>
<tr>
<td>
<input type="text" name="phone1_1" id="telefono1_1" class="form-control" disabled/>
<a title="Remove" class="btn btn-danger btn-xs aligned"><span class="fa fa-times"></span></a>
<input type="text" name="phone2_1" id="telefono2_1" class="form-control" disabled/>
<a title="Remove" class="btn btn-danger btn-xs aligned"><span class="fa fa-times"></span></a>
<input type="text" name="phone3_1" id="telefono3_1" class="form-control" disabled/>
<a title="Remove" class="btn btn-danger btn-xs aligned"><span class="fa fa-times"></span></a>
</tr>
</tbody>
</table>
アウト
チェックは、すべての入力が同じ行やセルにする必要があります理由はありますか? –