![]() |
#16 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
.toggle-answer { /* prevent accidentally selecting */ display: none; } |
|
![]() |
![]() |
![]() |
#17 | |
Enthusiast
![]() Posts: 38
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
Also, I'm pretty sure 'cursor: pointer;' which you deleted as well is proper CSS. And since you stripped the code which should prevent selecting text by accident comepletely, the comment is obsolete - however, I would at least keep 'user-select: none;', this is without any vendor prefix proper code, but maybe not sufficient for all kind of render engines. |
|
![]() |
![]() |
![]() |
#18 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,345
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
You also need to remember that not all css has been adopted into ePub standards. What works on a web page isn’t necessarily supported in an ebook.
My comment above was simply to show that just because some css doesn’t work in an epub doesn’t mean it is going to break the book if it is included. The epub is required to gracefully ignore css that it doesn’t support. So you can use all that css if you wish, it just isn’t guaranteed to work and you need to provide coding it can use as a fallback option. |
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,726
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<p class="answer">Answer to question #x</p> .answer { page-break-after: always !important; break-after: always !important; -moz-column-break-after: always !important; -webkit-column-break-after: always !important; } Last edited by RbnJrg; Yesterday at 05:19 PM. |
|
![]() |
![]() |
![]() |
#20 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
.answer { page-break-after: always; } |
|
![]() |
![]() |
![]() |
#22 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
Thanks for the suggestion & links! Using the footnote feature is a smart idea. I also thought about that. But about 150 of my answers have both text and images. Many of the images have width=1250px. I know that some eReaders show footnotes in a small popup, so I don’t think they will show the full answer with image properly |
|
![]() |
![]() |
![]() |
#23 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
You’re right. I don’t need to worry too much about Kobo Desktop if page breaks are working fine in other apps. So I’ll use page breaks. But I was also thinking of giving a kind of "fallback", just in case page breaks don’t work on someone’s device or app. Here’s my 2-step fallback idea: (1) Mix the order of the answers. (2) Add the same lines of text 3 or 4 times between every two answers. So for example, when someone clicks "show answer" for question 47, and page breaks are not working for their device or app, they will see something like this: To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. ===================== Answer 47. Yes, the sky is blue. "Go to Question" ===================== To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. ===================== Answer 382. It is not a table. "Go to Question" ===================== To go back to the question, please click on "Go to Question". Don’t flip pages forward or backward, you might see other answers that you don’t want to see yet. |
|
![]() |
![]() |
![]() |
Tags |
100vh, code, epub, margin, space |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EPUB2 vs EPUB3 | langshipley | ePub | 4 | 01-13-2023 06:47 PM |
[Plugin] epub2 output | Doitsu | Plugins | 11 | 12-01-2021 04:17 PM |
Hiding endnotes after the last page of an epub2 | HHJT | ePub | 52 | 02-27-2018 08:09 PM |
epub3 to epub2 | AlanHK | Sigil | 11 | 08-09-2017 05:06 AM |
EPUB2 and the DOCTYPEgate | roger64 | ePub | 21 | 07-18-2014 07:49 PM |