![]() |
#16 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
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
|
What is the height of a 'containing block' when you're device uses auto-scroll and doesn't have pages/screens??
![]() 1% of a 5000 word chapter would be a mighty large top margin... (and yes, I know there aren't many 5000 word chapters...that was a slight exaggeration for illustration purposes) I agree with jhowell that the 'vh' size would be more correct, but jswolf's 'small em' would be a better second choice... IMHO |
![]() |
![]() |
![]() |
#17 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
But that was only for @page. Top margin for, say, <h1> is still relative to the width of the containing block (usually <body>).
|
![]() |
![]() |
![]() |
#18 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
[code]<h1 class="chapter">Chapter One</h1>{/code] Code:
.chapter { font-size: x-large; text-align: center; margin-top: 90%; } |
|
![]() |
![]() |
![]() |
#19 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,937
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
It may make no sense, but that's how the standard says it should be rendered.
|
![]() |
![]() |
![]() |
#20 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
It makes sense, because "margin: 1%" would give the same margin all around, whatever it is.
|
![]() |
![]() |
![]() |
#21 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,937
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
margin: x% has the same effect as margin-top: x% margin-left: x% margin-bottom: x% margin right: x% I can see that. And I suspect it makes rendering easier too. But it still seems very odd that margin-top should be based on the width. |
|
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
For example, many use CSS columns in the background, then just shift the viewport to the next column when you go to the "next page". For more details, see the ebookcraft 2019 talk, "Pagination in the Browser: Why, What, and How". At ~20 mins in, she discusses the "Box vs. Column" methods. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Odd text appearing on top margin of Kindle books (both on iPad and Voyage) | solitarywolf | Amazon Kindle | 7 | 07-14-2016 01:54 PM |
CSS: Margin vs. Padding | ButWhy | Workshop | 6 | 07-31-2015 12:55 PM |
Top-margin (bottom-margin?) for Kobo? | Notjohn | Sigil | 14 | 02-28-2015 06:43 AM |
CSS margin instead of margin-top, etc. | icallaci | Conversion | 24 | 10-19-2013 09:52 AM |
calibre ignore margin-top and margin-bottom | bender | Calibre | 2 | 12-11-2009 06:58 AM |