How do I change the alignment of the product table's contents?
WooCommerce Product Table aligns all content to the left, which works fine for most tables.
There’s currently no built-in option to change the alignment, for example to center the text in the table. You can center column text using simple CSS. You can add the following to your theme’s stylesheet or in the Customizer (see Appearance → Customize → Custom CSS):
Center Alignment:
.wpt-dataview .table-header-cell, .wpt-dataview .table-cell {
text-align: center;
}
Right Alignment:
.wpt-dataview .table-header-cell, .wpt-dataview .table-cell {
text-align: right;
}
If you need any help with this then you can use our plugin customization service.
The CSS on this page is for the current table frontend. If your site is still in legacy mode, use the older selectors that start with .wc-product-table.
If searching the knowledge base hasn't answered your question, please contact support.