View Single Post
Old 03-09-2012, 03:55 PM   #1
Novelest
Junior Member
Novelest began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2012
Device: iPod, Nook Color, Kindle
First table row on page sometimes loses bottom margin - is this a bug?

Hello, first post here.

We're creating epubs with XSL and Ruby. I and others are seeing instances where the first table row on a page in iBooks loses its bottom margin, so the text partially overlays the text of the next row. This occurs whether the first line is first row of a table or is in a row in a table that is broken; the row can be broken across a page and it still happens. It only happens irregularly -- similar lines and rows in other locations do not show this problem. I have tried a variety of formatting on the row and on the table with CSS, but no luck. Has anyone seen this, and is there a way to prevent it (other than avoiding tables)? Or is it a bug in iBooks?

Here is a shortened HTML sample with relevant CSS entries. Would be happy to post more if it would help.

<table>
<tbody>
<tr>
<td>
<p class="last-para-in-cell">
<code class="cf ic">bind-key [key] [command]</code>
</p>
</td>
<td>
<p class="last-para-in-cell">
Creates a keybinding that executes the specified command. Can be shortened
to <code class="cf ic">bind</code>
</p>
</td>
</tr>
<tr>
<td>
<p class="last-para-in-cell">
<code class="cf ic">bind-key -r [key] [command]</code>
</p>
</td>
<td>
<p class="last-para-in-cell">
Creates a keybinding
that is repeatable, meaning
you only need to press the <code style="font-variant:small-caps" class="cf keystroke">Prefix</code>
key once, and you can press the assigned key repeatedly
afterwards. This is useful for commands where you want
to cycle through elements or resize panes. Can be shortened
to <code class="cf ic">bind</code>.</p>
</td>
</tr>
</tbody>
</table>

.simpletable {
margin-top: 1em;
margin-bottom: 2em;
border-collapse: collapse;
}

.simpletable td, .simpletable th {
text-align: left;
vertical-align: top;
padding-left: 0.5em;
padding-right: 0.5em;
}

.simpletable p.last-para-in-cell {
margin-bottom: 0pt;
}
Novelest is offline   Reply With Quote