zephyrmays

Q: Tables in iBooks not honoring font-size: css attributes

Within my validated flowing layout epub, I would like to have a table that is rendered 80% of the base font and the superscripted text within the table render some size smaller than the rest of the text within a particular cell. 

 

However, iBooks on iPhone 5 renders not only the table but the 'span' text at the same size as the rest of the surrounding text.  iBooks appears to ignore font-size: styling in tables completely (it does honor font-weight: though).

 

Is this normal/intentional behavior for iBooks?

 

table {
     width: 60%;
    
font-size: 0.8em;
     margin-left:auto;
     margin-right:auto;
     border-collapse: collapse;
}

.super_script {
     font-size: 80%;
     vertical-align: super;
}

<table id="table_1a-27">
     <caption class="table_caption">Table 1A-27</caption>
          <tr>
               <td>Some text<span class="super_script">Note 1</span></td>
          </tr>
          <tr>
               <td>
                    <ol>
                        
<li>Beginning of sentence<span class="super_script">Note 2</span> than the rest of the sentence.</li>
                        
<li>Some  stuff here</li>
                   
</ol>
               </td>
           </tr>

</table>

 

Message was edited by: zephyrmays to display markup

iBook, iOS 6.1

Posted on Feb 18, 2013 11:06 AM

Close

Q: Tables in iBooks not honoring font-size: css attributes

  • All replies
  • Helpful answers

  • by zephyrmays,

    zephyrmays zephyrmays Feb 18, 2013 11:53 AM in response to zephyrmays
    Level 1 (0 points)
    Feb 18, 2013 11:53 AM in response to zephyrmays

    Also I just noticed that iBooks on iPhone doesn't honor the border-collapse: attribute as well. 

     

    Thoughts?

     

    Regards,

     

    Zephyr

  • by Tom Gewecke,

    Tom Gewecke Tom Gewecke Feb 18, 2013 1:56 PM in response to zephyrmays
    Level 9 (79,555 points)
    Feb 18, 2013 1:56 PM in response to zephyrmays

    You may need to use the Fixed Layout epub format to do what you want.  A google search on that term will give you info.

  • by zephyrmays,Solvedanswer

    zephyrmays zephyrmays Feb 18, 2013 3:14 PM in response to zephyrmays
    Level 1 (0 points)
    Feb 18, 2013 3:14 PM in response to zephyrmays

    Ok so I puzzled thru my issues with getting iBooks to render superscripts and honor the CSS

     

    font-size:
    

     

    attribute.

     

    After playing around with verious versions of my stylesheet and different setting within iBooks for iPhone, it appears that iBooks does honor the font-size: attribute to a point.  If you set the text very small within iBooks using the 'AA' function, the app will only allow the content to become so small and then starts to disregard to proportional setting of superscripted text.

     

    It appears as you scale back out the font-size: attribute settings are applied when the resulting size is at or above the minimum font size for the device. 

     

    The confusing part is when making the app text display size smaller the superscripted items stop being scaled while the normal text keeps getting smaller to the point of being the same size (or nearly so) as the superscripted content.

     

    Hope this assists someone else in the future.

     

    Btw is there a dev reference (Apple or otherwise) site for iBooks?  I'm have an iTunesConnect membership but the resources there are limited and vague at best (with the notable exception of Book Proofer).

     

    Regards,

     

    Zephyr