Archived topic
I have an issue with the table block.
1 reply · Started by Heath on October 8, 2022
When I use the table block it doesn't show stripes like it should. I have selected stripes but it just shows the normal table. I assume it's a theme issue because it works with other themes.
Any fix to this?
Hi there,
so this is the core CSS styles for the striped tables:
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
background-color:#f0f0f0
}
Note the background color of #f0f0f0 is the same as the Content Background color of your site. So the stripes are not visible.
To fix that, you can either:
1. edit the Table Block, and in its settings change the Background Color eg. to #ffffff
or
2. You can use some CSS to change the odd stripe color:
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
background-color: #fff;
}