Quote:
Originally Posted by RbnJrg
You are doing something wrong. By writting "height: 100%" has no effect on children boxes (unless you also have "height: 100%" for <html> and <body> tags on ereaders based on Readium/Webkit. It has effect on ereaders based on RMSDK (ADE 2.x/3.x) but these last ones will ignore your "height: 80vh", so for that reason "height: 100%" works. But some ereaders based on Readium/Webkit won't use the full space you reserve for figure > svg (in your case "height: 80vh") unless you set "height: 100%" for figure. You must have something wrong with the width and height in your svg wrapper.
What? I suppose you are working under epub3, otherwise <figure> is not honored under epub2 and you shouldn't employed it in ADE (in ADE 4.x, as epub3, it WORKS). In Thorium and Calibre Viewer my code looks great; here you have some screenshoots:
1. In Thorium (with a font-size of 100%):
Attachment 216475 Attachment 216476
2. In Thorium (with a font-size of 137.5%):
Attachment 216477 Attachment 216478
3. In Calibre Viewer (with a font-size of 14px):
Attachment 216479 Attachment 216480 Attachment 216481
4. In Calibre Viewer (with a font-size of 18px):
Attachment 216482 Attachment 216483 Attachment 216484 Attachment 216485
I attach the respective epub so you can test it in your system. Open it in Calibre Viewer and start with a font-size: 14px; then increase the font-size to 28px. As you will be able to see, the caption remains with the picture and there is no fragmentation in the text (there is no blank space generated by the image and the change of the font-size). You must be doing something wrong, otherwise you would have the same output than me.
As I stated before, you have something wrong. Post your code here and I will be able to help you better.
|
I found the error: I had SVG height set to 100vh in the style sheet (the svg still had 100% height as an attribute in the html file – apparently attributes don't have priority over CSS, unlike inline-styles)
No more problems with captions on on the picture – but I can still make them split in Books and ADE 4.5. Your test file as well.