![]() |
#16 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
I'd never use tables (or frames) for lists. A <p class="my-custom-list-1"> etc works fine and renders on epub2, and converts to azw3/KF8 or KFX or epub3.
Indeed I avoid tables, and on epistolary content from Gutenberg I convert the two columns to alternating paragraphs, which is easier to read. That's less than ideal for bilingual texts that use facing pages (only works on PDF & Landscape tablet) or columns in a table, but actually works on a smaller (anything less than 8″) screen. Automatic from a docx paragraph style in LO Writer without using "list" property via Calibre. Last edited by Quoth; 06-28-2025 at 12:48 PM. |
![]() |
![]() |
![]() |
#17 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
@phillipgessert - Thank you for that info. Particularly that when things break they are unlikely to break consistently across platforms. That's fundamentally what I think I was trying to get some clarity on (in this question and many others I've asked): is there a one-size-fits-all solution. The answer, it seems, is a resounding "No".
|
![]() |
![]() |
![]() |
#18 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,193
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#19 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Yep, that's definitely the message I'm hearing. Fortunately, this is in the context of personal use, so for the time being I don't have to stress too much. On the other hand, I'm thinking of switching e-reader platforms some time in the not too distant future, so a library-wide reformat may be on the menu. Will cross that bridge if/when I get to it, though.
|
![]() |
![]() |
![]() |
#20 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<h2>Example on inlined blocks</h2> <p><span class="col1">A label</span><span class="col2">The text asociated to the label on the left. As you can see this text does not surround the previous one</span></p> <h2>Example on floated blocks</h2> <p><span class="col3">A label</span><span class="col4">The text asociated to the label on the left. As you can see this text does surround the previous one</span></p> Code:
.col1 { display: inline-block; width: 20%; vertical-align: top; background: lightgreen; } .col2 { display: inline-block; width: 80%; vertical-align: top; background: lightblue; } .col3 { float: left; padding-right: 4px; background: orange; } .col4 { background: khaki; } Code:
float: right; width: 80%; Last edited by RbnJrg; 07-05-2025 at 10:45 AM. |
|
![]() |
![]() |
![]() |
#22 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Quote:
Does this mean that two adjacent "inline-block" <p> elements will also want to run together? |
|
![]() |
![]() |
![]() |
#23 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
With the floating method you can have similar results if you add the properties "page-break-inside: avoid", "break-inside: avoid" and "-webkit-column-break-inside: avoid" but all these properties are implicit in inlined blocks. But with one caveat: while the "display: inline-block" property is supported by virtually all e-readers (including ADE), the "page-break-inside: avoid," "break-inside: avoid," and "-webkit-column-break-inside: avoid" properties are not supported by all e-readers. Last edited by RbnJrg; 07-05-2025 at 03:57 PM. |
|
![]() |
![]() |
![]() |
#24 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
This is kind of tangential, but related to how elements break, particularly in the context of actual e-readers: if you use "white-space: nowrap" on a string of text, but the text is longer than what fits on the reading screen (either because it's a small screen or because the user has significantly increased the font-size), how do e-readers render that? Will it just break the text at the last character that fits? Will it just "display" the excess text off screen? Will it burst into flames?
|
![]() |
![]() |
![]() |
#25 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.w3schools.com/cssref/pr_...hite-space.php and this: https://www.w3schools.com/cssref/pla...&preval=nowrap and this: https://www.w3schools.com/cssref/css...t-overflow.php and this: https://www.w3schools.com/cssref/pla..._text-overflow |
|
![]() |
![]() |
![]() |
#26 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Sorry, I wasn't clear with my question: is that how ereaders will treat it? For example, I know that with words that are longer than the screen width, some e-readers will break them automatically. I'm assuming (perhaps erroneously) those e-readers might treat "nowrap" strings similarly.
|
![]() |
![]() |
![]() |
#27 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
.nw { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Last edited by RbnJrg; 07-05-2025 at 08:35 PM. |
|
![]() |
![]() |
![]() |
#28 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Hmmm... wouldn't the "text-overflow: clip" clip/truncate the text?
Or, perhaps better stated: why wouldn't the "text-overflow: clip" clip/truncate the text? Will the "overflow" override the clip? But not the "white-space: nowrap"? Last edited by ElMiko; 07-07-2025 at 03:36 PM. |
![]() |
![]() |
![]() |
#29 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#30 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Okay, but e-readers don't generally allow scroll bars, right?
Perhaps a little context from me here would be helpful: What I'm trying to solve for here is transcript-like formatting where the speaker name/title is in the left column and the dialogue is in the right. I want to avoid word wrapping the "name/title" column unless, of course, the font size has been set so large that it wouldn't fit on the screen. Another way of saying it is, I want the column width of the left column to be equal to the width of the longest string of text it contains, no more and no less. My approach has been to use "nowrap" on the left column to ensure that it doesn't wrap if it's longer than 50% of the screen width. However, my concern is that using this method, if someone sets the font size too large, the text from the left column could disappear off the right side of the screen. Granted, in most cases, for this to happen the font-size would have to be pretty big or the screen would have to be pretty small (e.g. phone-sized), but it's still technically possible. Last edited by ElMiko; 07-07-2025 at 09:11 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatting calibredb list? | loviedovie | Calibre | 5 | 10-18-2015 02:20 PM |
Help with proper dashed list formatting, desperate at this point | luczak | ePub | 4 | 07-06-2011 04:18 PM |
Content Master List of Books with Known Formatting Issues | whitearrow | Amazon Kindle | 52 | 04-25-2010 06:57 PM |
Great article on ebook formatting and web standards (A List Apart) | Prospect | News | 6 | 03-10-2010 01:14 AM |
line formatting formatting question | daesdaemar | Workshop | 9 | 02-06-2009 11:47 AM |