I'm facing an issue with aligning a button placed inside a table cell. The table setup is as follows:
<b-table
v-if="rows.length"
:thead-tr-class="'bug-report-thead'"
:tbody-tr-class="'bug-report-tbody'"
:items="rows"
:fields="columnsToDisplay"
:sort-compare="sortTableByKey"
:striped="true"
:bordered="true"
:outlined="true"
:hover="true"
:no-sort-reset="true"
:show-empty="true"
:filter="filter"
@filtered="onFiltered"
:empty-text="emptyText"
:sort-desc="true"
:caption-top="true"
responsive>
/b-table>
The button code is as follows:
<template slot="iinstances" slot-scope="row">
<div v-if=" total_rows>0 && row.item.imProdInstDet!=''">
<b-button style="text-align: center" :variant="'primary'" @click.stop="row.toggleDetails" class="mr-1">
More Details
</b-button>
</div>
</template>
I'm trying to center the button within the cell using margin:auto; display:block;
as suggested in this guide: how to center the button inside a table cell but it doesn't seem to be working.