View Single Post
Old 06-18-2021, 03:37 AM   #1
jonesyb
Enthusiast
jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.
 
Posts: 36
Karma: 82258
Join Date: May 2021
Device: kindle
Formatting tables best practices

I have had varying degrees of success formatting tables for eBooks. Here is an example of one I did recently that seems to work OK.




Code:
table { 
        max-width: 90%;
        border-collapse: collapse;
        border-spacing: 0;
        margin: 1em auto 0 auto;
        vertical-align: baseline;
    }
#table  td, th {
        border: 1px solid #ddd;
        padding: 5px;
    }
Code:
<table summary="" id="table">
    <tbody>
        <tr>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
        </tr>
        <tr>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
        </tr>
        <tr>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
        </tr>
        <tr>
            <td>
               ***
            </td>
            <td>
                ***
            </td>
            <td>
                ***
            </td>
        </tr>
    </tbody>
What is your method? Can you offer any improvements to what I have here? I would love to hear your insights as I want to make sure I am building them in the best way possible so they can be viewed properly on as many devices as possible.
jonesyb is offline   Reply With Quote