So how many elections did we have last year? Seems like at least a dozen, though it was probably only about half that. For the bigger elections, like the primaries and the November general election, the Rome News-Tribune had full results pages to show vote totals as they came in. In the smaller elections, though, I just made a simple HTML table that the numbers could easily be inserted into. Here’s an example of the HTML for one of those tables.
What it looks like:
| xx of xx precincts reporting | |
|---|---|
| Office 1 | |
| Candidate 1 | xx |
| Candidate 2 | xx |
| Candidate 3 | xx |
| Candidate 4 | xx |
| Office 2 | |
| Candidate 2 | xx |
| Candidate 3 | xx |
| Candidate 4 | xx |
Your table may look a little different because of the styles on this page, but it’s pretty much what you see above. Obviously, this can be used for any table you need, and to make more categories, just copy and paste. And now for the code:
<table style="border-collapse: collapse;" border="1" cellpadding="5" width="300" bgcolor="#ffffff"> <tbody> <tr> <th colspan="2"><span style="color: #000000;">xx of xx precincts reporting</span></th> </tr> <tr> <th colspan="2"><span style="color: #000000;">Office 1</span></th> </tr> <tr> <td width="240"><span style="color: #000000;">Candidate 1</span></td> <td width="60"><span style="color: #000000;">xx</span></td> </tr> <tr> <td><span style="color: #ff0000;">Candidate 2</span></td> <td><span style="color: #ff0000;">xx</span></td> </tr> <tr> <td><span style="color: #000000;">Candidate 3</span></td> <td><span style="color: #000000;">xx</span></td> </tr> <tr> <td><span style="color: #000000;">Candidate 4</span></td> <td><span style="color: #000000;">xx</span></td> </tr> <tr> <th colspan="2" width="300"><span style="color: #000000;">Office 2</span></th> </tr> <tr> <td><span style="color: #000000;">Candidate 2</span></td> <td><span style="color: #000000;">xx</span></td> </tr> <tr> <td><span style="color: #000000;">Candidate 3</span></td> <td><span style="color: #000000;">xx</span></td> </tr> <tr> <td><span style="color: #ff0000;">Candidate 4</span></td> <td><span style="color: #ff0000;">xx</span></td> </tr> </tbody> </table> |







