09-15-2021, 04:11 AM | #16 |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Do not use <pre>. If the lines are long enough, and the font large enough, the text will not wrap in some cases.
|
09-15-2021, 09:55 AM | #17 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
09-17-2021, 10:37 PM | #18 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
It's not for paragraphs of prose. It's for PRE-formatted text: where you explicitly put in every linebreak. The use here is probably for a few words of "output": Enter password:_ and the like. But if you might use longer lines, you can also allow wrapping by defining: pre {white-space: pre-wrap;} |
|
09-18-2021, 01:25 AM | #19 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I agree with JSWolf in this case.
I wouldn't rely on <pre>. Too many readers overflow off the edge of the screen (don't linebreak properly), especially when raising font sizes or reading on skinny screens, etc. Just rely on simple <p> or <span>, then apply the monospace font to them: Code:
<p class="terminal">I AM A HUMAN.</p> <p class="terminal">I AM NOT A ROBOT.</p> Code:
<pre>I AM A HUMAN. I AM NOT A ROBOT.</pre> Note: In ebooks, the only place <pre> + <code> might be acceptable is actual code blocks (like pasting actual C++ or Java code)... but even there, if I was creating the ebook, I'd likely rely on <p> or images for better compatibility. (Luckily, I haven't had to do that often. The SINGLE programming book I did create code blocks for, I generated PDFs + SVGs + PNGs of the entire syntax-highlighted code block, inserted in the ebook as an image, then linked to the actual github code. It's a formatting mess that I wouldn't wish on anybody.) Last edited by Tex2002ans; 09-18-2021 at 01:34 AM. |
09-18-2021, 02:17 AM | #20 |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
|
09-18-2021, 04:23 AM | #21 |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
09-18-2021, 07:20 AM | #22 |
the rook, bossing Never.
Posts: 11,161
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I'd not use <pre>; I'd use an explicit paragraph style.
|
09-18-2021, 01:16 PM | #23 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Eh...the problem with that is nothing really "locks in" (no punny irony intended) the look/feel and alignment of text like PRE. You can go for monospace, but still, that's not preformatted.
At least, that's my experience with it. FWIW. I'm sure that there's some mad CSS out there that would prove me wrong. Hitch |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Locking of threads | PeterT | Feedback | 10 | 05-28-2013 03:15 PM |
Touch kepub locking up | leaperk | Kobo Reader | 3 | 12-17-2012 07:34 PM |
Locking for new software | ntome | Which one should I buy? | 5 | 07-04-2011 11:58 AM |
Locking the Keyboard | mornington | Amazon Kindle | 1 | 12-04-2010 11:35 AM |
Locking of threads | Kevin R | Feedback | 1 | 08-09-2010 02:22 AM |