Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-24-2025, 09:49 AM   #61
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Slevin#7 View Post
As you may see here, this is all you can configure about margins:
Attachment 217075

And whatever you set, it only affects page margins, not any p-tag or elsewhat margins.

I never set any applications to German, since this makes things just senseless complicated for development, but to explain, 'unset' means really unset and not default in the sense of author's preference.

Anyhow, I will share now my current solution which has the benefit to keep semantically correct p-tags. I will add this pseudo-element class only to selected p-tags where absolutely necessary due to styling issues otherwise. At least with the readers I've tested there seems no clash so far with the standardly applied styles. And Google also makes no troubles although height is set to 0. So here we go:

CSS
Code:
p.special-treatment:before,
p.special-treatment:after {
  content: "";
  display: block;
  height: 0 !important;
}

p.special-treatment:before {
  margin-top: 2em;
}

p.special-treatment:after {
  margin-bottom: 2em;
}
We add block elements with a height of 0, apply margins and therefore stay in the same margin-scope with p which allows for collapsing.

Hallelujah everyone, just doing well asylum style...
If you choose Unset, do the margins set in CSS take effect?
JSWolf is offline   Reply With Quote
Old 07-24-2025, 09:51 AM   #62
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Slevin#7 View Post
Which reader would that affect, and with which result?

I mean, ADE isn't worth the time to deal with - out of curiousity I've looked up the iOS app, it is 4 years old and has one of the most bad ratings in the whole app store of 1.1 out of 105 votes, that's just awful. All reviews, really ALL are 1 star and complaining through and through. I have never seen something like that, even Disney's Snow White got better ratings. So if there is no real requirement other than ADE, just let it die gracefully...
It effects nooks, Sony Readers and ALL Kobo Readers because Kobo use an older version of RMSDK and you cannot be sure if the eBooks will be read as ePub (RMSDK) or KePub (ePub3 compatible), you have to code as though they will be read with RMSDK.
JSWolf is offline   Reply With Quote
Old 07-24-2025, 09:52 AM   #63
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
Very many older ereaders (maybe all that do epub) and some current ereaders use ADE.

Obviously apps on iOS and Android are a different kettle of fish and very many Android ereaders make epubs worse than a conversion to mobi for a Gen1 or Gen2 Kindle, certainly far worse than ancient ADE versions on a Binatone ereader. Absolute garbage. Though it's a few years now since my mad spree of testing Android ereader apps.

Edit:
Not impossible that ADE on iOS is crippled in some fashion.
You forgot Kobo that uses an older RMSDK and are still current as well as the firmware on most models.
JSWolf is offline   Reply With Quote
Old 07-24-2025, 11:36 AM   #64
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 69
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by JSWolf View Post
If you choose Unset, do the margins set in CSS take effect?
This is where the real weird shit starts to happen: between p-tags still no margins, but between p and div the margin gets applied. The only issue, I almost have no p among divs where that would show up, only at some seldom placed vignettes, thus I've never encountered that behavior before. Anyhow, the most important application for p-tag margins is between p-tags. This is just no normal behavior.

And: the page margins get set at a level between small and standard. Since I'd consider that not beautiful I'd had to set these margins as well with the result that other readers might look crap. So as a solution I would have to apply body margins via JavaScript, that's just an overkill of precalculation for most of the readers which will then take even more time to start presenting the pages.

And let's be honest: most of the people will have margins set (by default they are set to standard) and never come up with the idea to unset them so that they can see nicer displayed vignettes (besides the fact that I'd have to include a manual about the how and what and why so that they'd even know about this crap).

Quote:
Originally Posted by JSWolf View Post
It effects nooks, Sony Readers and ALL Kobo Readers because Kobo use an older version of RMSDK and you cannot be sure if the eBooks will be read as ePub (RMSDK) or KePub (ePub3 compatible), you have to code as though they will be read with RMSDK.
But with what result, will the :before and :after styles simply get ignored or do there serios things happen?

Last edited by Slevin#7; 07-24-2025 at 11:44 AM.
Slevin#7 is offline   Reply With Quote
Old 07-24-2025, 12:12 PM   #65
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,784
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Slevin#7 View Post
And: the page margins get set at a level between small and standard. Since I'd consider that not beautiful I'd had to set these margins as well with the result that other readers might look crap. So as a solution I would have to apply body margins via JavaScript, that's just an overkill of precalculation for most of the readers which will then take even more time to start presenting the pages.
Take into account that that is only valid for epub3; on epub2 you don't have JS.

Quote:
But with what result, will the :before and :after styles simply get ignored or do there serios things happen?
They are simply get ignored.

By the way, test the epub I attach; I didn't test it yet but I think it will work. There you have another way to apply especial margins that work everywhere (for my part, I will continue applying <div>; I don't care about semantics, but about the result).
Attached Files
File Type: epub Test_of_Margins_Bis.epub (2.7 KB, 9 views)
RbnJrg is offline   Reply With Quote
Old 07-24-2025, 12:54 PM   #66
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,111
Karma: 105211945
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
You forgot Kobo that uses an older RMSDK and are still current as well as the firmware on most models.
No, I wrote "some current models use ADE"
Quoth is offline   Reply With Quote
Old 07-24-2025, 01:37 PM   #67
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 69
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by RbnJrg View Post
They are simply get ignored.
As long as the rest of the stylesheet gets applied properly everything's fine. It woud be a problem when the reader would dismiss the whole stylesheet because of this.

Quote:
Originally Posted by RbnJrg View Post
By the way, test the epub I attach; I didn't test it yet but I think it will work. There you have another way to apply especial margins that work everywhere,
Everywhere but PocketBook iOS
Click image for larger version

Name:	IMG_1273.png
Views:	16
Size:	194.9 KB
ID:	217087

Quote:
Originally Posted by RbnJrg View Post
for my part, I will continue applying <div>; I don't care about semantics, but about the result
That's still an option, I just haven't made a final decision yet. Thankfully I don't have to provide for all readers out there on the market, it's enough to have one or the other additional to Apple Books and GPB and Calibre. Thorium is partially even worse since you can't style headlines, so this piece of crap goes onto the pile of the other crap with ADE and its brothers.

I'd like to have a reader, even a paid one, that would be as good as BookFusion, but without a subscription model and having the books local in the cell phone and not on third-party servers - just haven't found it yet.
Slevin#7 is offline   Reply With Quote
Old 07-24-2025, 03:12 PM   #68
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,784
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Slevin#7 View Post
Everywhere but PocketBook iOS
Attachment 217087
It will work Just increase the width from 90% to 97% in the .bigMargin style.

Quote:
I'd like to have a reader, even a paid one, that would be as good as BookFusion, but without a subscription model and having the books local in the cell phone and not on third-party servers - just haven't found it yet.
You don't need a paid ereader, just use Cantook:

https://apps.apple.com/es/app/cantoo...o/id1476410111

Now I use that ereader in my Android (Androis version, of course) to read epubs (by the way, its support for epub3 is superb).

Last edited by RbnJrg; 07-24-2025 at 03:17 PM.
RbnJrg is offline   Reply With Quote
Old 07-24-2025, 05:32 PM   #69
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
No, I wrote "some current models use ADE"
I was looking for RMSDK and not ADE.
JSWolf is offline   Reply With Quote
Old 07-24-2025, 05:33 PM   #70
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by RbnJrg View Post
You don't need a paid ereader, just use Cantook:

https://apps.apple.com/es/app/cantoo...o/id1476410111

Now I use that ereader in my Android (Androis version, of course) to read epubs (by the way, its support for epub3 is superb).
How well does CanTook respect the CSS?
JSWolf is offline   Reply With Quote
Old 07-24-2025, 06:46 PM   #71
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,784
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
How well does CanTook respect the CSS?
So far, the best app to read epubs. Except for MathML, it honors css3 perfectly.
RbnJrg is offline   Reply With Quote
Old 07-24-2025, 06:48 PM   #72
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,111
Karma: 105211945
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
I was looking for RMSDK and not ADE.
I was using ADE as a generic term to include the embedded version, RMSDK. My woolly writing!

Sorry.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using <p> instead of <div> goderic Sigil 4 09-25-2024 11:12 AM
A tag that's new to me <div/> DyckBook Editor 7 11-13-2021 02:30 AM
<div> problem alheva Marvin 30 08-23-2016 09:13 PM
duplicate div id's thiefwriter ePub 6 09-17-2011 11:00 AM
Center a div marcelo2605 ePub 4 05-13-2011 07:39 AM


All times are GMT -4. The time now is 06:11 AM.


MobileRead.com is a privately owned, operated and funded community.