Archives For May 2017

testing, testing…

May 14, 2017

A test posting for table building. All of this was hand built HTML and CSS using the HTML view of the advanced WordPress web editor. There is no default table building capability in the WordPress editors, and my readings on the subject always leads to the installation of a plugin, which I refuse to do due to security issues. Too many WordPress hacks are due to bugs in any number of third-party plugins.

Header 1 Header 2
Content Cell 3 Content Cell 4
Content Cell 5 Content Cell 6
Content Cell 7 Content Cell 8
Content Cell 9 Content Cell 10

And here’s what the table HTML and CSS look like.

<table style="width: 100%; border: 1px solid #cccccc; border-collapse:collapse;">
<tbody>
<tr>
<td style="border: 1px solid #cccccc; padding: 4px; background-color: #fadbd8;"><strong>Header 1</strong></td>
<td style="border: 1px solid #cccccc; padding: 4px; background-color: #fadbd8;"><strong>Header 2</strong></td>
</tr>
<tr>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 3</td>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 4</td>
</tr>
<tr>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 5</td>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 6</td>
</tr>
<tr>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 7</td>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 8</td>
</tr>
<tr>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 9</td>
<td style="border: 1px solid #cccccc; padding: 4px;">Content Cell 10</td>
</tr>
</tbody>
</table>

Note that in the table tag style definition I had to defined “border-collapse:collapse;” in order to get the tight lines in the table. I discovered that the mobile version (Chrome on Android 7 on a Moto G4 Plus) of this site showed the cell borders separate (i.e. with white space) from each other and from the outer table border. The collapse removes all white space and allows the table to render the same across multiple browsers executing on multiple platforms.

Also for future reference: I finally got rid of the onslaught of comment spam by turning on the 14 day limit on comments. I left commenting on posts unlimited, and that’s where the spammer’s would come in and dump their crap. I have no idea why, but once the limit was turned on the number of spam comments dropped to zero.