In EPUB 3 FXL, if the body element has the CSS property position, its implicit width becomes zero in Kobo iOS. As a consequence, descendants with dimensions relative to the body (be it by having explicit percentage-based dimensions while not contained within another element of dimensions not relative to the body, or by simply inheriting their width from body) inherit too a width of zero. In such case, text boxes break lines after each word.
displays correctly in a browser and Kobo for Mac 3.12.0 running on OS X 10.10.3, but not so in Kobo for iOS 7.4 on an iPad 3 running iOS 8.1.3 (not tested on any other Kobo app/device):
Removing the body element's CSS position corrects the issue in Kobo for iOS, but breaks it on desktop browsers[^1]. Providing the text box with an explicit width in an absolute unit (such as px) so that it does not inherit from body makes it work properly in both Kobo for iOS and desktop browsers.
[^1]: You might have added position: relative along with width and height in px to the body for the purpose of previewing such pages in a desktop browser for editing or QA purposes. Desktop browsers have windows of variable size and disregard the viewport dimensions' declaration. Therefore, descendant elements whose dimensions and positions are percentage-based relative to the body would not display correctly on desktop browsers, unless body has explicit width and height in px and position. Ereaders, having fixed viewport sizes, do not need those, but having them present or not should make not difference for ereaders provided the body CSS dimensions match those of the viewport meta tag.
In EPUB 3 FXL, if the
body
element has the CSS propertyposition
, its implicit width becomes zero in Kobo iOS. As a consequence, descendants with dimensions relative to thebody
(be it by having explicit percentage-based dimensions while not contained within another element of dimensions not relative to the body, or by simply inheriting their width frombody
) inherit too a width of zero. In such case, text boxes break lines after each word.An XHTML file with this markup:
displays correctly in a browser and Kobo for Mac 3.12.0 running on OS X 10.10.3, but not so in Kobo for iOS 7.4 on an iPad 3 running iOS 8.1.3 (not tested on any other Kobo app/device):
Removing the
body
element's CSSposition
corrects the issue in Kobo for iOS, but breaks it on desktop browsers[^1]. Providing the text box with an explicitwidth
in an absolute unit (such aspx
) so that it does not inherit frombody
makes it work properly in both Kobo for iOS and desktop browsers.[^1]: You might have added
position: relative
along withwidth
andheight
inpx
to thebody
for the purpose of previewing such pages in a desktop browser for editing or QA purposes. Desktop browsers have windows of variable size and disregard theviewport
dimensions' declaration. Therefore, descendant elements whose dimensions and positions are percentage-based relative to thebody
would not display correctly on desktop browsers, unlessbody
has explicitwidth
andheight
inpx
andposition
. Ereaders, having fixed viewport sizes, do not need those, but having them present or not should make not difference for ereaders provided thebody
CSS dimensions match those of the viewport meta tag.