11-14-2017, 06:05 AM | #1 |
Connoisseur
Posts: 97
Karma: 44418
Join Date: Jul 2013
Location: Mostly in my own head!
Device: Kindle Fire, iPad
|
Floated text missing in Aldiko Book Reader for iOS
Let me start by saying that I'm only facing this issue on the iOS version of Aldiko Book Reader... the formatting works in the android version so this may be a bug.
I have a contents page where I have the chapter numbers (in roman numerals) and the name of each chapter. I want the numbers right-aligned and the chapter names left-aligned. See the first screenshot attached below. In order to style the numbers differently from the names, the chapter names and the chapter numbers are placed in separate <span> tags within a containing <p> tag. I have one <p> tag for each entry in the html TOC. In my XHTML: Code:
<div id="contentsContainer"> <p> <span class="rightAlign">I.</span> <span class="left-align">Down the rabbit-hole</span> </p> <p> <span class="rightAlign">II.</span> <span class="left-align">The pool of tears</span> </p> </div> Code:
div#contentsContainer { width: 75%; margin: 1em 12%; text-align: center } /* Formatting unrelated to floating text */ div#contentsContainer p { font-family:"Some Font"; font-size: 1em; margin-top: 0.8em; margin-bottom: 0.8em; } /* Format chapter numbers */ /* Give the <span> a width, float it left and right-align */ span.rightAlign { display: block width: 15%; float: left; text-align: right; } /* Format chapter names */ span.leftAlign { display: block; text-align: left; text-indent: 0.5em; /* Little space between number and name */ } This code works for all the apps and e-readers which I've tested on except Aldiko Book Reader for iOS. In Aldiko, the floated text is simply missing. See the second screenshot. Note: I've only added borders to make it easier to understand the layout of the page. Can anyone spot if I've missed something? Or is it a bug which needs to be reported? Thanks in advance Nabodita |
11-14-2017, 09:10 PM | #2 |
Resident Curmudgeon
Posts: 73,974
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Given that this is an ePub, do you actually need a contents page since you already have the NCX ToC?
|
Advert | |
|
11-14-2017, 09:20 PM | #3 |
A Hairy Wizard
Posts: 3,094
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
|
It looks like you are trying very hard to use a div to make a table or an ordered list. How about just using an ordered list??
Code:
<ol> <li>Down the rabbit-hole</li> <li>The pool of tears</li> </ol> CSS: ol {margin:.5em 25%; list-style-type:upper-roman; list-style-position:outside} li {margin:0 0 .5em; text-align:left; page-break-inside:avoid} |
11-15-2017, 01:44 AM | #4 | |
Connoisseur
Posts: 97
Karma: 44418
Join Date: Jul 2013
Location: Mostly in my own head!
Device: Kindle Fire, iPad
|
Quote:
@Turtle91 I was also considering using an ordered list and I'm happy to have some code to try out. Will post back on this as soon as I've finished testing it. I don't know how to thank you, though. However, my concern remains that my code works on all readers and apps that I've tested except the Aldiko Book Reader for iOS where the floated element (in this case, some text included in a span tag) is simply missing. If this is a bug, I'd at least like to report it. In this specific case, I have alternatives... I can omit the contents page completely or I can use lists or tables. However, if Aldiko is ignoring floated elements, I hate to think what will happen to books where images etc are floated. Edit: @Turtle91 Damn, the code is simple and works perfectly... considering the trouble I went to to achieve the same formatting, I feel like an ass! Last edited by Nabodita; 11-15-2017 at 02:08 AM. Reason: Updated testing results |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Text truncated in Aldiko Book Reader | leitz | Reading and Management | 0 | 06-29-2015 09:51 PM |
Aldiko Book Reader Premium V2.2.3 released (Android) | Alexander Turcic | Android Devices | 1 | 08-29-2013 07:36 AM |
Comparison of iOS e-book reader software on Wikpedia | Philantrop | Apple Devices | 35 | 05-16-2013 05:30 PM |
Text overlapping images in Nook, Aldiko | djkmann | Conversion | 0 | 05-05-2013 04:22 PM |
Why Text content Overlaps on Floated Images in iBooks? | Raja1205 | Apple Devices | 2 | 09-23-2012 05:02 AM |