View Single Post
Old 10-05-2012, 03:46 AM   #13
cathalmc
Member
cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.cathalmc ought to be getting tired of karma fortunes by now.
 
Posts: 16
Karma: 510134
Join Date: Sep 2012
Device: Kindle
It's very possible to create tables for a Kindle! I made an ebook guide to London 2012 which had hundreds and hundreds of tables of data. With a bit of tinkering and formatting they looked fine on a Kindle.

Here are two of em:





Here's the HTML code behind the Usain Bolt 100 metres record table:

<table class="records-table">
<tr>
<th scope="col"><br /></th>

<th scope="col">Time</th>

<th scope="col">Record Holder</th>

<th scope="col">Year</th>
</tr>

<tr>
<td>WR</td>

<td>9.58</td>

<td><a href="http://www.youtube.com/watch?v=By1JQFxfLMM">Usain Bolt (JAM)</a></td>

<td>2009</td>
</tr>

<tr>
<td>OR</td>

<td>9.69</td>

<td>Usain Bolt (JAM)<br /></td>

<td>2008</td>
</tr>
</table>


I've just noticed that errant <br /> tag after "Usain Bolt (JAM)" in the code. Sigil had a habit of putting them in occasionally. That one sneaked past my testing phase

Here's the CSS. I learned how to do this from this online tutorial.

.records-table
{
align:center;
border: 1px solid #333;
border-spacing: 0.1em;
padding: 0.1em;
margin-top: 0.1em;
margin-bottom: 0.1em;
font-size: 0.8em;
}

.records-table th, .records-table td { border: 1px dotted #666; padding: 0.2em;}

.records-table caption
{
caption-side: top;
font-size: 0.9em;
text-align: center;
}

Last edited by pdurrant; 10-06-2012 at 04:14 AM. Reason: fixed picture links
cathalmc is offline   Reply With Quote