![]() |
#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. |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,655
Karma: 134254544
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.
|
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#4 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,159
Karma: 18843349
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
|
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% |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,551
Karma: 11250580
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Pocketbook Era, Kindle Oasis 2
|
Quote:
https://github.com/jstallent/ImagesSingleFile |
|
![]() |
![]() |
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,655
Karma: 134254544
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.
|
![]() |
![]() |
![]() |
#7 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,159
Karma: 18843349
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 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. |
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#9 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,655
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#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 |
|
![]() |
||||
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 |