Hey,
Thanks for posting, there is css for a table. Would it be possible for you to link to where you are adding that so I can see this output. Perhaps once I see what you are doing I’ll understand how you are getting an unstyled table.
Ben
Thanks for the quick response.
I haven’t published the article, but you can see the above screenshot.
It’s a part of the upcoming article in which I’ve added a table and it is looking like this on the front end.
https://pasteboard.co/JOrJ57o.png
There’s no borders.
ok, how are you adding a table? Are you using the classic editor or a pagebuilder or the core table block?
Ben
woo you answered even before I’ve hit the submit button 😛 lol
I’m using a classic editor, no pagebuilder, nor gutenberg.
ok, can you send me the html you are adding?
Also because I’m curious why are you not using the block editor? This is easily the issue in the block editor you can define the style of the table using the core block.
Ben
Here’s the code
<table width="640">
<tbody>
<tr>
<td width="320"><strong>Sync Pair</strong></td>
<td width="320"><strong>Type</strong></td>
</tr>
<tr>
<td width="320">Player – Torchic</td>
<td width="320">Support</td>
</tr>
<tr>
<td width="320">Skyla – Swanna</td>
<td width="320">Support</td>
</tr>
<tr>
<td width="320">Steven – Mega Metagross</td>
<td width="320">Physical Strike</td>
</tr>
<tr>
<td width="320">Sygna Suit Red – Mega Charizard X</td>
<td width="320">Special Attack Strike</td>
</tr>
<tr>
<td width="320">Sygna Suit Elsa – Rotom</td>
<td width="320">Support</td>
</tr>
</tbody>
</table>
I’m kinda classic editor fan, I’m using it from quite a long time now and not yet ready to upgrade. I’m trying blocks on some other blogs but still I like classic editor.
Hey,
Update your code to this (just adding the block class)
<table width="640" class="wp-block-table">
<tbody>
<tr>
<td width="320"><strong>Sync Pair</strong></td>
<td width="320"><strong>Type</strong></td>
</tr>
<tr>
<td width="320">Player – Torchic</td>
<td width="320">Support</td>
</tr>
<tr>
<td width="320">Skyla – Swanna</td>
<td width="320">Support</td>
</tr>
<tr>
<td width="320">Steven – Mega Metagross</td>
<td width="320">Physical Strike</td>
</tr>
<tr>
<td width="320">Sygna Suit Red – Mega Charizard X</td>
<td width="320">Special Attack Strike</td>
</tr>
<tr>
<td width="320">Sygna Suit Elsa – Rotom</td>
<td width="320">Support</td>
</tr>
</tbody>
</table>
Ben
Yes, it worked.
Wish it would have been added by default to all the table, so that I don’t need to manually add class to all the table.
I know with blocks It is easier but I’m not yet ready to fully shift to blocks.
Hope you’ll add a tiny css for all the tables.
Anyways, thanks for pointing out.
One of the reasons to go by class is we don’t create styling conflicts with plugins that add tables. So we’ll see I’m not sure I want to potentially affect styles of other tables by forcing this on the table tag.
Ben