10-07-2024, 02:57 PM | #1 |
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2024
Device: Kindle Scribe
|
Do you prefer text- or image-based title pages?
(By which I mean actual title pages, as opposed to cover pages.)
I am curious to know what folks tend to prefer here when you have a choice, text-based or image-based? Either way, assuming you prefer to keep things on a single page, how do you enforce that? Asking because I have a text-based title page design that, thanks to the image in one case being just over a certain size threshold, seem to want to spill over into a second page even when I set constraints via CSS. The location where it breaks varies, and my CSS (example below) is often circumnavigated, somehow. Example HTML/CSS: Code:
HTML <body class="title-page"> <h2>Example title page</h2> <p>Lorem ipsum.</p> <figure> <img src="../images/example-title-page.png" alt="Example title page" aria-describedby="fig-example"/> <figcaption id="fig-example">Example image</figcaption> <p>Lorem ipsum.</p> </body> CSS .title-page, .title-page h2, .title-page p, .title-page figure, .title-page figcaption { break-before: avoid; break-after: avoid; break-inside: avoid; page-break-before: avoid; page-break-after: avoid; page-break-inside: avoid; } Aside from just having a vague preference for using text in an ePub whenever possible, I also have more specific concerns about dark and light reading modes. The PNGs I'm currently working with for this temporary solution have the text set against a transparent background and I am wondering what might happen if I switch to JPG. Of course I'll be testing that myself at some point soon, but figured I would include it here anyway since it's relevant. Suggestions & input are very welcome! Last edited by Fitz Frobozz; 10-07-2024 at 03:12 PM. |
10-07-2024, 03:09 PM | #2 |
Wizard
Posts: 1,357
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
I will use either, and depends on how decorative the title page is in the pbook.
If the title page is basic, I'll use text. If the title page is using decorative fonts, maybe a border and fluerons, I'll scan it and use the image. I then wrap the image in svg tags. I don't have any issues with the image overflowing, or a second page being forced, no matter how big the image is. |
Advert | |
|
10-07-2024, 03:50 PM | #3 |
A Hairy Wizard
Posts: 3,225
Karma: 19000635
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
|
Ditto Karellen.
Just a couple quick comments about your example code… no particular order or priority. I’m sure it’s just a typo, but you need to close out the </figure> after your </figcaption>. Your css isn’t letting it pagebreak anywhere. Since these are just suggestions to the render (avoid if possible) it will break out at some point but you aren’t giving it anywhere you prefer to breakout, so it’ll just go wherever. Since you are using ePub3, you may be able to use some of the more advanced layout options available with display:flex if you want to use text with a small graphic, or just use svg wrapper for a full page image. |
10-07-2024, 09:37 PM | #4 | ||
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2024
Device: Kindle Scribe
|
Quote:
Quote:
|
||
10-07-2024, 10:23 PM | #5 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
And, besides the solutions posted above, you can also consider a svg image, that is a different thing that a .jpg or .png inside a svg wrapper. |
|
Advert | |
|
10-08-2024, 12:13 AM | #6 | |
Enthusiast
Posts: 28
Karma: 10
Join Date: May 2024
Device: Kindle Scribe
|
Quote:
RE your and Dion's mention of epub3 I should mention that while I'm very tempted by the merits of epub3, my intention has been to to support epub2 (and possibly other formats) in this and other projects, so I'm trying to resist adding too many epub3-only features and creating more work for myself later. (So far iirc it's all relatively minor stuff that should be easy to repro in epub2, knock on wood.) Oh, and thanks also for the SVG reminder. I'll mess around with that in a bit. Probably a good fit for these pages. |
|
10-08-2024, 12:27 AM | #7 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Well, well, well. Then you need to build an epub3 ebook with fallback code for epub2 too, so if your epub is opened with modern apps/devices, then the reader can get the best reading experience; on the other hand, if the epub is opened with old ereaders, only the epub2/css2 code takes place. We have talked a lot about this subject in this forum; do a search and you'll find a lot of info.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do you prefer justified or left-aligned text on a your ereader? | CalbertAmu | General Discussions | 103 | 01-14-2017 12:40 PM |
PRS-T1 HTML to EPUB no word-wrap on some pages/missing pages of text | SonyPRST1Reader | Sony Reader | 4 | 01-28-2016 09:40 AM |
How do I set sort title based on the title with multiple books? | loviedovie | Calibre | 2 | 02-09-2015 04:08 PM |
Image overlayed over text (but text visible if image disabled)? | Kaylee Skylyn | ePub | 5 | 08-01-2012 06:27 PM |
Sending text based web pages to kindle | tgnd | Amazon Kindle | 2 | 07-10-2011 01:10 AM |