-
Versite
Hi,
how can I edit table border properties? The menu options for this in a WordPress Block for tables are disabled/invisible, I assume GP does this.
I need to use invisible table borders to force a layout mixed with text blocks and pictures.
Thank you
-
David
Hi there,
it will require CSS.
Can you share a link to where i can see the table on your site ? -
Versite
I sent a private link.
-
Fernando
Hi Versite,
Will all tables on your site have the same border color? If so, try adding this through Appearance > Customize > Additional CSS:
.wp-block-table td { border: solid 1px #ff0000; }
If you’re looking for different colors, add a custom class to your Table. Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
Then, the code for that would be something like this:
.YOUR-CUSTOM-CLASS td { border: solid 1px #ff0000; }
-
Versite
Hi Fernando,
the code above gives me a 1px red border, which is not what I need. I need invisible borders, so I changed it to
.wp-block-table td { border-width: 0px;}
Still, there is a faint dotted line on the left and top side of the table.
I get the same result (i.e. no invisible borders) with
.wp-block-table td { border: none; }
So I suspect that there is something else going on. The site uses a photo as a background so I cannot match the color to hide the borders.
-
Fernando
Add this:
.wp-block-table table { border: none; }
-
Versite
Hi Fernando,
Thank you, adding both statements removes all borders.
I would be nice to have the ability to edit table properties without custom CSS.
-
Fernando
That’s a WordPress feature/Block. GP has no control over that.
An alternative would be to use a GB Grid Block so you have control over the borders: https://docs.generateblocks.com/article/grid-overview/
-
Versite
When I use the default theme, I can edit the table properties in the block editor, with GP these options are not there. So my assumption was that is is related to GP.
I will look into GB, can I do simple things like the one we are discussing with the free version?
-
Fernando
Yes, that’s available in the free version.
As for the border settings not showing in GP, you’re right. It’s excluded in GP for issues it can cause. See Tom’s explanation here: https://github.com/tomusborne/generatepress/issues/389
- You must be logged in to reply to this topic.