|
|
#1 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55
Karma: 730488
Join Date: Sep 2025
Device: Kobo Clara BW
|
Table Alternative?
I am attempting to create an ePub. I moved the text into a Word DOCX and did some formatting there, and then I converted it to an ePub in Calibre. Now, I'm making some adjustments to the bits that aren't working as expected.
And I'm stuck on one bit. The rest I should be good to sort out. What's the best way to reformat this part, so that the bits line up like in the printed text without it being in a table? <table class="table_"> <tbody class="calibre4"><tr class="tr_"> <td class="td_"><p class="block_10">☊</p></td> <td class="td_"><p class="block_10">☋</p></td> </tr> <tr class="tr_"> <td class="td_"><p class="block_3">Y'AI 'NG'NGAH, </p></td> <td class="td_"><p class="block_3">OGTHROD AI'F </p></td> </tr> <tr class="tr_"> <td class="td_"><p class="block_11">YOG-SOTHOTH </p></td> <td class="td_"><p class="block_3">GEB'L—EE'H </p></td> </tr> <tr class="tr_"> <td class="td_"><p class="block_3">H'EE—L'GEB </p></td> <td class="td_"><p class="block_11">YOG-SOTHOTH </p></td> </tr> <tr class="tr_"> <td class="td_"><p class="block_3">F'AI THRODOG </p></td> <td class="td_"><p class="block_3">'NGAH'NG AI'Y </p></td> </tr> <tr class="tr_"> <td class="td_"><p class="block_11">UAAAH </p></td> <td class="td_"><p class="block_11">ZHRO </p></td> </tr> </tbody></table> I haven't renamed and redid the CSS yet, so the current definitions for block_11 and block_ 3 are: .block_3 { display: block; line-height: 1.2; margin: 0; padding: 0; text-indent: 1.5em; text-align: justify; } .block_11 { display: block; font-style: italic; line-height: 1.2; margin: 0 0 8pt; padding: 0; } The italics is wrong as well as the justify. This is from this section of the book. The author died over 70 years ago, so this should be in public domain. https://en.wikisource.org/wiki/Page%...-_1971.pdf/101 Thanks. Last edited by bdub; 08-24-2026 at 08:40 PM. |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,899
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
That looks like a simple centre.
<p class="centre">Y'AI 'NG'NGAH,</p> <p class="centre">OGTHROD AI'F </p> .centre { text-align: center; text-indent: 0; } |
|
|
|
|
|
#3 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,014
Karma: 182150291
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I made a few changes to the CSS since much of it was missing and other parts didn't make sense.
Spoiler:
and here is the modified CSS: Spoiler:
I didn't bother with adding table_ and tr_ to the CSS since this was just a quick and dirty test. Last edited by DNSB; 08-24-2026 at 11:28 PM. |
|
|
|
|
|
#4 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,899
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Hmm, just looked at the wikipedia example again, wondering how I completely misunderstood the OP, but it is now pointing to a different page with two centred columns.
I guess that is why the post has been edited. |
|
|
|
|
|
#5 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 859
Karma: 2111023
Join Date: Sep 2013
Device: Kobo Sage
|
I'd recommend deleting all those <p></p> pairs inside the <td></td> elements and moving any classes modifying those <p></p> pairs into the <td></td>. Having <p></p> within <td></td> always seems to mess up formatting for me (particularly line spacing).
Code:
<table class="table_">
<tbody class="calibre4">
<tr class="tr_">
<td class="td_">☊</td>
<td class="td_">☋</td>
</tr>
<tr class="tr_">
<td class="td_">Y'AI 'NG'NGAH,</td>
<td class="td_">OGTHROD AI'F</td>
</tr>
<tr class="tr_">
<td class="td_ italic">YOG-SOTHOTH</td>
<td class="td_">GEB'L—EE'H</td>
</tr>
<tr class="tr_">
<td class="td_">H'EE—L'GEB</td>
<td class="td_ italic">YOG-SOTHOTH</td>
</tr>
<tr class="tr_">
<td class="td_">F'AI THRODOG</td>
<td class="td_">'NGAH'NG AI'Y</td>
</tr>
<tr class="tr_">
<td class="td_ italic">UAAAH</td>
<td class="td_ italic">ZHRO</td>
</tr>
</tbody>
</table>
|
|
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,934
Karma: 9699999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
If you don't want to use a table, there's the option (and in this case, I'd say it's preferable) of a two-column layout based on the "display: inline-block" property. A quick solution could be the following:
XHTML Code: Code:
<div class="wrapper">
<div class="column">
<p>☊</p>
<p>Y'AI 'NG'NGAH,</p>
<p><i>YOG-SOTHOTH</i></p>
<p>H'EE—L'GEB</p>
<p>F'AI THRODOG</p>
<p><i>UAAAH</i></p>
</div>
<div class="column">
<p>☋</p>
<p>OGTHROD AI'F</p>
<p>GEB'L—EE'H</p>
<p><i>YOG-SOTHOTH</i></p>
<p>'NGAH'NG AI'Y</p>
<p><i>ZHRO</i></p>
</div>
</div>
Code:
.wrapper {
text-align: center;
width: 100%;
}
.column {
display: inline-block;
width: 40%;
text-align: center;
vertical-align: top;
}
.column p {
margin: 0;
text-indent: 0;
}
Last edited by RbnJrg; Yesterday at 11:41 AM. |
|
|
|
|
|
#7 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55
Karma: 730488
Join Date: Sep 2025
Device: Kobo Clara BW
|
I had a bad copy and paste that I didn't catch until after I had posted.
|
|
|
|
|
|
#8 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55
Karma: 730488
Join Date: Sep 2025
Device: Kobo Clara BW
|
Quote:
I asked for a non-table version because I've had issues with tables rendering on my KOBO. I'm still cleaning up the CSS and formatting, but I should be able test out this approach this weekend on my KOBO. I do need to better understand what inline block actually does, so I'll dig in more this weekend. What do you mean by optimization here? Thanks everyone else for the other suggestions too. |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Table of Contents not being identified as Table of Contents | openletter | Conversion | 2 | 10-19-2012 12:54 AM |
| Anyone know how to convert a pdf table into a table in Word or HTML? | BasilC | Workshop | 7 | 06-25-2010 01:02 AM |
| Sideway Table in ePub (Rotate table/text) | Lapiz | ePub | 3 | 01-29-2010 01:11 PM |
| Forget coffee table books-- how about a kitchen table book? | ardeegee | Lounge | 10 | 12-02-2009 12:00 PM |
| Unutterably Silly The alternative alternative Friday Question 21 August 2009 | Wetdogeared | Lounge | 13 | 08-26-2009 09:47 AM |