07-13-2023, 08:51 AM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
<figure> and <figcaption>
If I code a picture with a caption:
<figure> <img...> <figcaption>...</figcaption> </figure> isn't this picture+caption then supposed to be 1 unit? I'm asking because I specified a style="height:100vh" on the <figure>, but it looks as if the "height" only affects the <img> and not the caption. At least in ADE 4.5.11.187658 it does. |
07-13-2023, 09:51 AM | #2 |
Resident Curmudgeon
Posts: 74,019
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Are you doing this coding for yourself or is it for a book that's going to be for sale? I ask because how you code it depends on what you are going to do with the book.
|
07-13-2023, 10:37 AM | #3 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
It's all for myself. I started doing this - or at least, trying to do it - when I found that ADE didn't properly display several pictures in the book. They kind of "disappear" at the bottom of the page, and I cannot scroll down then to see the rest.
So I'm trying to get the (pretty large) picture and its caption onto a separate page. I thought that framing the <IMG and its <FIGCAPTION with <FIGURE this way, would allow me to do it. But - according to ADE - I do manage that with the <IMG (it gets onto a new page) but the <FIGCAPTION doesn't. The <IMG occupies the whole page (top to bottom) and the caption is displayed on the next page. |
07-13-2023, 11:47 AM | #4 |
A Hairy Wizard
Posts: 3,097
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Not sure if it'll work but have you tried setting the size of the img and figcaption separately?
figure: height:100vh figure image: height:80% figure caption: height:20% |
07-13-2023, 12:24 PM | #5 | |
Wizard
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Quote:
https://github.com/jstallent/ImagesSingleFile |
|
07-15-2023, 01:49 PM | #6 |
Resident Curmudgeon
Posts: 74,019
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But if the image and figure do not fit the screen together, then they would have to slit. There's no way to prevent this.
|
07-16-2023, 12:04 AM | #7 |
A Hairy Wizard
Posts: 3,097
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
What I was thinking was the <figure> would take the full viewport height (100 vh), then the image would take 80% and the caption would get 20% of the parent container (the figure). That should fit everything on one page. Of course you may need to adjust the ratio of image to caption size as needed for your image/caption.
If your device/app is too old to support vh then this method obviously wouldn’t work. |
07-16-2023, 02:33 PM | #8 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
I might give that a try, but in the meantime I'm starting to think that the problem might be with ADE.
If I load the original Epub in ADE, it displays just a part of this (very) large picture. Without any scrollbars. I thought: what if it's clipping, because the picture simply won't fit in the viewbox, and "overflow: hidden"? So I set "overflow:auto" in the CSS-class for the picture, expecting scrollbars to appear. They don't. The picture's now visible completely, as if it's been put onto a new page, but the caption still appears on the next page. So, a lot better, but still not quite what I wanted. I think I'm going to post this in an ADE forum. |
07-16-2023, 02:35 PM | #9 | |
Resident Curmudgeon
Posts: 74,019
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
07-17-2023, 03:29 AM | #10 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
|
Adobe Digital Editions Version 4.5.11.187658.
|
Tags |
<figcaption>, <figure>, ade |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Prettify removes space between bold an italic inside figcaption | repilo | Sigil | 7 | 05-11-2022 06:35 PM |
Could someone help me figure this out? | juniemarie | Audiobook Hardware & Software | 65 | 03-30-2016 07:29 PM |
<figure> and <figcaption> refused by Sigil | tosca30 | Sigil | 7 | 12-05-2014 04:27 AM |
Can't figure it out. | mwhiteway | Introduce Yourself | 9 | 09-02-2011 04:19 AM |
Can't figure this out, HELP! | chilady1 | 1 | 09-26-2010 12:13 AM |