html - Centering a button inside a table using css and bulma
问题描述
I am using Bulma as a CSS frame to style my angular app, currently, I have a table that looks like this :
I am trying to make it look more like this :
How do I center the button and make the table look as close as it can to this one?
Here is the code I am using :
<table
class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth"
>
<thead>
<tr>
<th>SESSION_ID</th>
<th>CARD_NUMBER</th>
<th>TRANSACTION_AMOUNT</th>
<th>TERMINAL_ID</th>
<th>EXTERNAL_STAN</th>
<th>TRANSACTION_DATE</th>
</tr>
</thead>
<tbody>
<tr
*ngFor="
let row of MatchTransactions.onlyInFile1
| slice: 0:(page + 1) * 5;
let i = index
"
>
<td>{{ row.SESSION_ID }}</td>
<td>{{ row.CARD_NUMBER }}</td>
<td>{{ row.TRANSACTION_AMOUNT }}</td>
<td>{{ row.TERMINAL_ID }}</td>
<td>{{ row.EXTERNAL_STAN }}</td>
<td>{{ row.TRANSACTION_DATE }}</td>
</tr>
<tr>
<td class="is-centered" colspan="6">
<button
class="button"
*ngIf="
(page + 1) * 5 < MatchTransactions.onlyInFile1.length
"
(click)="page = page + 1"
>
Show more
</button>
</td>
</tr>
</tbody>
</table>
解决方案
<tr>
<td class="has-text-centered" colspan="6">
<button class="button">Show more</button>
</td>
</tr>
推荐阅读
- php - 如何在laravel刀片中打印条形码生成xml
- hashmap - 如何将 cosmosdb 文档列表转换为哈希图并将值附加到其中
- android - react-native run-android 命令无法解析配置“:classpath”的所有工件
- r - '['(左方括号)被视为函数时有什么作用?
- c++ - 有没有办法按段对向量进行排序?
- jupyter-notebook - 在 jupiter notebook 中运行 T-SQL,可能吗?
- javascript - 数据表计算总负载
- python - 如何减少内存的使用?
- spring - mapstruct 将可迭代映射到不可迭代
- python - 如何使 tkinter 标签的背景透明,以便只看到文本?