Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2025, 04:06 PM   #16
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 43,592
Karma: 165170966
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by nabsltd View Post
Do you use padding so it doesn't collapse? I use margin-bottom: 0.1em; specifically because I want it to collapse if the next paragraph happens to have a larger top margin (like after a section break).
If I remember the reason I went with padding years back, it was a trade off between not collapsing before a scene break which already tend to have spacing which hides the padding and the occasional bottom of the page having a line moved to the next page. I haven't looked at that code in close to a decade according to my last comments in the commented version of my basic stylesheet.
DNSB is offline   Reply With Quote
Old 01-24-2025, 04:29 PM   #17
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: 78,549
Karma: 142993688
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 nabsltd View Post
Do you use padding so it doesn't collapse? I use margin-bottom: 0.1em; specifically because I want it to collapse if the next paragraph happens to have a larger top margin (like after a section break).
When I used to use space followed by a non-indented paragraph I used a bottom-margin. But the space can get lost if it's at the bottom of the page. So I switched to a padding-bottom and it kept the space so the space could wrap to the next page.

Now I use a 20% 2px line with space above and below for a section break because it looks better and uses less space.

I also use just <p> for most paragraphs as I don't need a class there. Here is the code I use for a section break.

CSS:
Code:
hr {
  margin-top: 0.9em;
  margin-right: 40%;
  margin-bottom: 0.9em;
  margin-left: 40%;
  border-top: 2px solid;
}
hr + p, p.nonindent {
  text-indent: 0;
}
Here is the HTML code for the section break.

HTML:
Code:
<hr/>
<p>

Last edited by JSWolf; 01-24-2025 at 04:45 PM.
JSWolf is offline   Reply With Quote
Old 01-28-2025, 12:14 PM   #18
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 511
Karma: 8008008
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by DNSB View Post
If I remember the reason I went with padding years back, it was a trade off between not collapsing before a scene break which already tend to have spacing which hides the padding and the occasional bottom of the page having a line moved to the next page.
I think a margin-bottom at the bottom of a screen is supposed to collapse, so it shouldn't move that line to the next screen, even though without the collapse the box would be large enough to not fit on the screen.

That said, who knows what rules are being used by various reading software. Years ago, the Onyx Boox didn't collapse margins at all, so the space was the sum of the two margins.
nabsltd is offline   Reply With Quote
Old 01-28-2025, 01:53 PM   #19
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: 13,449
Karma: 102739837
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
margin-top collapses to zero on first element of a page with many ereaders/apps, but padding-top doesn't.

I'd expect margin bottom on a last element of a page ought to also collapse to zero on same systems, but I've not checked. That would make sense.
Quoth is offline   Reply With Quote
Old 01-28-2025, 02:03 PM   #20
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: 78,549
Karma: 142993688
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
But then there are lots of lousy programs for reading eBooks. So I would expect some of them not to collapse a bottom margin at the bottom of the page.
JSWolf is offline   Reply With Quote
Old 01-29-2025, 11:44 PM   #21
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,800
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I use Padding because some readers ignore YOUR margin for theirs.

Sadly, there are just too many reading aps that don't behave the same. I pity the book wranglers that have to deal with all the fallout from unhappy customers because of this crud.
theducks is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
There's no spacing between paragraphs Tior500 Conversion 1 12-02-2019 10:18 AM
CSS to indent paragraphs and remove spaces Alda Sigil 7 06-20-2014 05:36 AM
expression to remove double spacing between paragraphs ktj Calibre 4 07-26-2011 02:38 PM
Remove spacing between paragraphs - what about div tags ? NASCARaddicted Calibre 5 11-07-2009 05:47 AM
Remove spacing between paragraphs doesn't. Djehuty Calibre 6 04-28-2009 04:53 AM


All times are GMT -4. The time now is 05:48 AM.


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