|
|
Thread Tools | Search this Thread |
12-29-2023, 01:39 PM | #1 | ||
Member
Posts: 10
Karma: 10
Join Date: Dec 2023
Device: none
|
How do I center the TITLE PAGE of my ePub files and make them fit the entire frame?
I manage my library in Calibre but when I open my eBooks in Adobe Digital Editions (ADE), many of them have title pages that are too big and get cropped off frame EXHIBIT A: Or they are not positioned at the center of the frame. EXHIBIT B: How do I fix that ? In a previous thread I asked a similar question about cover pages for which I had found a fix. However, that fix does not work for title pages. A perfect title page for me looks like this: EXHIBIT C: 1. It's scaled to fit the entire frame. 2. It is placed at the center. Any idea how I can fix my problem? If it helps, this is the code for Exhibit A: Exhibit A Code: Quote:
Exhibit B Code: Quote:
PS: I'm a complete newbie to code. I find it very intimidating and completely suck at it, so please explain to me like I'm 5 if your solution requires typing code. |
||
12-29-2023, 05:14 PM | #2 |
Well trained by Cats
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You want to be fussy, you need to learn the basics (EPUB is pretty basic when compared to a Web Page)
First, wrap your head around the Box Model concept. W3C schools has good explanations. EPUB is really Boxes within boxes. Then understand the smallest level box. Margins is the spacing from others Borders are the box edges (most cases this is 0, no color) Padding is the space from the box to the actual contents (words or image) Feedbooks chapter titles look complex. In fact the style is really simple, making use of padding and borders. |
Advert | |
|
12-30-2023, 09:16 AM | #3 |
the rook, bossing Never.
Posts: 12,352
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Some ereaders / apps will ignore a top margin on the first item in a new file (which causes a page break). They will though do the padding-top correctly.
margin-bottom and margin top allow spacing between paragraphs (or other things) instead of blank lines. An ebook should have only one space at any space, no tabs and no spaces at the start and end of a paragraph/line. There should be no line-height statements. W3C is really good, but it's orientated at web pages/web sites, so it doesn't always apply to ebooks. |
01-02-2024, 07:31 AM | #4 |
Wizard
Posts: 1,082
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
You can use the same SVG wrapper used for covers, like suggested on the topic you referred to.
This is the code I use for EPUB3 (like your examples): Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="pt-BR" xml:lang="pt-BR"> <head> <title>Capa</title> <style type="text/css"> @page { padding: 0pt; margin: 0pt; } body { padding: 0pt; margin: 0pt; column-count:1; } div.Cover { text-align: center; padding: 0pt; margin: 0pt; height: 100vh; } </style> </head> <body> <section epub:type="cover" aria-labelledby="book_cover" aria-describedby="cover_desc"> <div class="Cover"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1362 1958" role="img"> <title id="book_cover">Capa do livro A comunidade secreta</title> <desc id="cover_desc">Garota andando por uma estação ferroviária, com o trem ao seu lado soltando fumaça</desc> <image height="1958" width="1362" xlink:href="../Images/cover00335.jpeg"/> </svg> </div> </section> </body> </html> |
01-02-2024, 09:52 AM | #5 |
Well trained by Cats
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Why fight it, when the built in tools can do it (and other metadata) for you?
Polish will insert, remove... items selected using the data currently in the Library. The cover is inserted in a SVG wrapper (like above) |
Advert | |
|
01-02-2024, 10:19 AM | #6 | |
Wizard
Posts: 1,082
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
The cover tool is limited to the cover image. With snipets I can use this for any full page image. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I center the cover photos of my ePub files and make them fit the entire page? | CrankyLamb | Editor | 13 | 01-03-2024 06:46 PM |
EPUB to PDF - force image to be fit within single page | Douman | Conversion | 7 | 09-27-2020 12:55 PM |
Images fit page as mobi, but not ePub | Mat Ward | ePub | 2 | 12-20-2012 12:48 AM |
ePub files do not center a custom <hr /> tag! | Haidon | ePub | 2 | 08-21-2010 05:29 AM |
How to center/fit page width SVG images with <OBJECT> | amoroso | ePub | 0 | 07-31-2010 12:48 PM |