![]() |
#16 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,760
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#17 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,245
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
![]() |
![]() |
![]() |
#18 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 183
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
|
Quote:
Last edited by Moonbase59; 07-20-2025 at 08:33 PM. |
|
![]() |
![]() |
![]() |
#19 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
I was trying to be circumspect in my annoyance at the div/p switcharoo, but I'm gratified to see I'm not alone in this.
@Sarmat89 - I'm curious what you mean by divs "requir[ing] less work to generate"... Are you referring to defining margins in css? If so, I suppose you're technically right, but I'd also think that typing "margin: 0;" isn't all that onerous. Or is there some other idiosyncratic workflow to which you are referring? @Quoth - archive's epubs are a travesty. It doesn't help that their OCR is pretty crummy to begin with, but the epubs are basically just a straight pdf to epub conversion, complete with headers, footers, about a gajillion forced line breaks, and more OCR-based artifacts than you can shake a stick at. Without an ounce of exageration, the end result is flatout unreadable. I don't know why they even offer the epub file. But at least it's not all <div> tags, I guess... @Jellby - that's EXACTLY it... I've seen this now multiple times: the whole document is just <div>s and <span>s! I thought that maybe someone out there had a really unique workflow; I didn't realize that this is autogenerated. Although it invites the question: what kind of sociopath would design software that exclusively uses those two tags for text conversions...? Last edited by ElMiko; Yesterday at 03:40 AM. |
![]() |
![]() |
![]() |
#20 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,760
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,771
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Regarding <div> in place of <p> (or <h*> tags) I must say that many times I had to do that because of bugs in Thorium an PocketBook. PB has issues with especial margins and paddings (it doesn't honor them) so when I want a <p> with margins (or paddings) different from what I declared in the stylesheet for "p", I must replace the tag for a <div>
![]() The same happens with Thorium regarding <h*> tags. The program doesn't honor the font-size set in the stylesheet. It's awful but if I want compatibility with Thorium , I have to replace for example <h1> with <div class="header1"> to get a proper font-size. Last edited by RbnJrg; Yesterday at 12:21 PM. |
![]() |
![]() |
![]() |
#22 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
@RbnJrg - I knew I could count on you for some decent outlier cases!!
Now, I'm curious in the case of the <p> margins not being honored, does that mean that even if you wrap them in a div (with margins), no margins will be reflected? Or simply that margin attributes directly at the <p> level aren't honored. Does this wonkiness extend to blockquotes? @JSWolf - Yeah, I'd be curious to know who is the criminal responsible for this, too. Frankly, the books I've seen with this not only are guilty of the div/span coding, but also the css is usually ridiculously bloated. Like, multiple classes that are different from eachother only in the most marginal sense—think "margin: 0 1px;" vs "margin 0 2px;" or "font-size: 1.0em;" vs "font-size: 1.00012583em". In retrospect, those ridiculous decimals should have been a dead giveaway that it was a program, not a person. (although the designer presumably WAS a person, and deserves a jail sentence) Last edited by ElMiko; Yesterday at 11:48 AM. |
![]() |
![]() |
![]() |
#23 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,771
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
p { margin: 0; ... } Code:
<div style="margin: 2em 0"> /* This is honored */ <p style="margin: 1.5em 0">This is my test</p> /* This isn't */ </div> Code:
<div style="margin: 3.5em 0"> This is my test </div> Code:
<div class="bigMargin"> <p>This is my test</p> <p>This is my test</p> <p>This is my test</p> </div> Code:
.bigMargin { margin: 2em 0; /* PB will honor this */ } .bigMargin p { margin: 0.5em 0; /*PB won't honor this */ } |
|
![]() |
![]() |
![]() |
#24 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Diaps toolbag (Sigil PI) is a start. I wish it could have a bit more helpers (inventory Tags and THEIR classes. You select a Tag type, The the value pulldown allows a choose list of the classes (and the tick to keep those is default) Helps eliminate typo retries) |
|
![]() |
![]() |
![]() |
#25 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 183
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
|
@RbnJrg: Couldn’t really believe what you said about the Pocketbook, because I always found their renderer rather compatible. I own a Pocketbook Era (PB700), Firmware U700.6.8.4183.
I took an older test file and quickly put your ".bigMargin" example in, setting the "div" background to green so we can see what’s happening. As far as I can see, all is as intended. I enclose the test EPUB so you can try for yourself. Sigil, Thorium, Foliate and the actual device show it works fine. Oh, and KOReader, too. Just in case anyone wonders: Block element vertical margins usually collapse, that’s why we don’t see "more margin" in the example. Last edited by Moonbase59; Yesterday at 03:23 PM. |
![]() |
![]() |
![]() |
#26 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,771
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Download the app; open the epub I attach with PB and you'll be able to check that the app doesn't honor especial margins. Here you have how it looks under Sigil: And here you have a screenshoot of PB: As you can see, margins are not honored ![]() You can also try it with Thorium by trying to increase the font size in an <h*> tag; it doesn't accept it. Instead, it uses the program's default size. Last edited by RbnJrg; Yesterday at 03:47 PM. |
|
![]() |
![]() |
![]() |
#27 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 183
Karma: 1000000
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
|
@RbnJrg: There must be something odd with your setup (or settings?).
I admit I never before used the Android Pocketbook App but installed it now, out of curiosity (v5.59.0.22307.release). Here are screenshots of the two EPUBs, mine and yours. All seems good. But, tbh, we’re getting a little off-topic… ;-) |
![]() |
![]() |
![]() |
#28 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 451
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
@Moonbase - actually, this very on topic! As much as I deeply enjoy griping about crummy code (and although it appears that 99.9% of the div/p substitution is just that), I really did want to know if it EVER makes sense to write epubs like that. So if you guys can get to the bottom of this weird PB behavior I'll consider the thread entertaining AND useful!
(I'm also still curious to hear clarification on what makes div "easier" than p for Sarmat's workflow) |
![]() |
![]() |
![]() |
#29 | ||
Connoisseur
![]() Posts: 63
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
Quote:
Thus, keep the community alive and let all who wanna sing a little song just give their best ![]() |
||
![]() |
![]() |
![]() |
#30 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,635
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I've got a weird idea about this: if you write a code automatically, and don't have to chose between div and p, and only write div class=..., yes, it can be much easier. But it's a weird idea, as I say.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |