View Single Post
Old 06-08-2011, 03:23 PM   #1
SoftwareManiac
Member
SoftwareManiac began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2011
Device: Kindle
Getting table borders to work with calibre - Amazon's .mobi format (from InDesign):

Using Amazon's Kindle PlugIn (KPI) v.92 a single-cell Note paragraph has a nice border!

Not sure you all can help me, but I am using some other tools to generate tables in .mobi format that you all support.

I can't seem to get tables to render correctly and I think my understanding of how .mobi supports tables is incomplete. Using InDesigns Export to EPUB feature and calibre to conver the .epub file to .mobi generates a similar table but without any borders!

In fact, any table I attempt using these tools never seems to be able to create any borders.

<table id="table-5" class="Note-Table">
<tbody>
<tr>
<td>
<p class="Note-Body"><span class="BOLD-1">Note: </span>This is a note that should stand out and reside in a single table cell with a gray background. Hopefully this will have some sort of standoff from normal text. Usually a caption does not follow a Note Table.</p>
</td>
</tr>
</tbody>
</table>

In the template.css I made some simple changes (bolded) that should work, but instead the .mobi file does display the dark gray text color and the changed top and bottom margins (from 0 to 1em) as expected. The border style definitions are simply ignored (border:1 so it is very hard to visually detect that the multicolumn text is actually a table. I've tried all sorts of thing like changing the border-width and style as well as using a single border definition of border: 1px solid black; and yet nothing seems to work!

table.Note-Table {
border-collapse : collapse;
border-style : solid;
border-width : 2px;

border-color : #000000;
margin-top : 1em;
margin-bottom : 1em;

}

p.Note-Body {
font-family : Arial, sans-serif;
font-weight : normal;
font-style : normal;
font-size : 0.71em;
text-decoration : none;
font-variant : normal;
line-height : 1.2;
text-align : left;
color : #202020;
text-indent : 0px;
margin : 1em;
}

I have reviewed the v1.8 Kindle Guidelines and there appears to be no <table>, <td>, or any other definition specified so I am "guessing" how to create the HTML and corresponding CSS to work. My goal is to somehow come up with the right CSS code that allows me to put borders around the table and cells. I realize that using calibre to convert from .epub to .mobi may be at risk, but I think the conversion is pretty straightforward. Other feedback I've gotten from other forums indicate that .mobi is such an old format that I'll never get tables to look good -- I don't believe that since I have already proven that KPI produces tables with borders that look great!

Do you all have any suggestions as to what table CSS settings can give me a table border?
SoftwareManiac is offline   Reply With Quote