Site logo

Archived topic

Striped table borders formatting

7 replies · Started by Chris on October 12, 2021

Viewing posts 1–8 of 8

Hi,

GP appears to add borders to the striped tables, which I like. However, the way they are placed is weird.

When I switch to a striped table I get a top border, a border on the left and a border on the bottom which comes with a ~20px gap. So there is a ~20px gap between the table and the bottom border. I switched to a different theme and the issue is gone. The border appears to be below the caption, even if there is none.

Is that a bug? And why is there no border on the right side of the table?

Hi Chris,

Can you link us to a sample page on your site w/ a striped table? to check how its styled. (in case a plugin's CSS is messing with it)

You can use the private information to provide the site details. :D

Unfortunately I can't link anything. But I found other topics in this forum discussing the issue with left/top borders. What I didn't find was anybody mentioning the bottom not closing the table but instead appearing ~20px below the table. I don't think I have anything else installed messing with it, can you recreate the error on your end?

can you recreate the error on your end?

Can you provide the details on how you've added the said striped table? (i.e., plugin used, plugin version )

So we can replicate it faithfully and see the issue.

I just added a table with the Gutenberg editor and then selected "Striped" in the styling options. AFAIK this is basic WordPress functionality.

Hi Chris,

Try this CSS to remove the bottom margin:

figure.wp-block-table.is-style-stripes table {
    margin-bottom: 0;
}

And why is there no border on the right side of the table?

The right border should be there on front end, can you check?

Let me know :)

Thank you that worked for the bottom border. The right border is still missing.

Now how would I go in adding the same border all around the table and inside the table for rows and columns? I would like to have the same borders the default table has (including for columns and rows), just for the striped version.

I would like to have the same borders the default table has (including for columns and rows), just for the striped version.

Any specific reason that you are using the stripped style if you still want all the default borders?

Can you link us to the site in question so we can work on the CSS?

This archived topic is closed to new replies.