![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
More iPad/iBooks anomalies
With Jellby's kind help I've been able to get my handmade ePub documents to show the cover in the bookshelf, and to open at the cover, and I've also learned how to centre paragraphs where necessary.
But I have found two more anomalies and would like some help. - When I go to the TOC the cover is not shown as an option, even though it shows in the same file on my Sony - that is, the TOC on the iPad starts at the option below what is the first one in the toc.ncx file. - I'm doing a book which has text on the title page and an image below that. The markup is <div class="centre" style="margin-top: 40px;"> <img src="images/greenman.png" alt="Green man" width="40%" /> </div> which works perfectly well on my Sony and validates to W3C standards. But on my iPad the image takes up the full width of the screen - apart from the iPad/iBooks imposed wide margins. I use the same markup on another section of the ebook to show an image at 30% width, and very similar markup in a different ebook to float an image to one side of the screen and have the text flow around it. Both these examples work as well on the iPad/iBooks as they do on the Sony/ADE. I've tried several solutions, like putting the markup in the CSS, putting a div around the div shown above, and so on. They work and validate on my Sony, but don't work in the iPad. Can anyone help please, or point me to a source which discusses anomalies in iBooks? |
![]() |
![]() |
![]() |
#2 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Might help if you put the markup in CSS and add the !important modifier, thus: Code:
width: 40% !important; |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I have Elizabeth Castro's book both as an ebook and as a print book, and I agree that it's an excellent book. But I'm not convinced that her explanation for non-centering paragraphs is correct; I have several ebooks where centred paragraphs behave the same on an iPad as they do on my Sony, even though they have other markup (eg font-size) in the same class. And I have seen several occasions where the same markup works well in one iPad/iBooks ebook and insists on being flush left in another. I admit that the span hack brings it back to being centered. This is almost as much fun as we had in the olden days in getting websites to behave the same on different browsers. |
|
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
I am guessing the two images are not the same size. iBooks defaults to displaying an image at full size (up to the size of the screen), unless you constrain it in the surrounding <div> by setting the height and width and then tell the <img> to display at 100%. The user can double tap the image and it will zoom out to display full size. I am guessing this may be your issue.
|
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I don't for a moment doubt your accuracy regardin iBooks behaviour, but I'm not sure that your explanation is correct. Since my last post I've used a different image in the same place - same markup - and it does not expand. And I've used the this same image on the next 'page' set at a smaller percentage, and it does not expand and appears at the different percentage. Could you give me a reference please to iBook's settings and behaviour? Is there an 'iBooks manual'? |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
Quote:
Is your second working image the exact same dimensions as the first image that doesn't work? If it isn't then that would be one reason you see a change. The only way I have been able to get images to work properly in iBooks is to set a style with a "width: XXpx; height: XXpx" of whatever size I wanted to use and then wrap the <img> in a <div> that uses the above style and setting the <img> style to 100%. I got this from Elizabeth Castro's blog that was linked to you above. After reading her comments and playing around with it I finally got it to work for my epubs. Images in iBooks are a pain because Apple wants to display the image full size no matter what you tell the image size constraints to be in the tag. |
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
Right now I'm looking at my iPad, which is open at an ebook I converted from a Word document and made into an ePub. It has many images, some of which I have set to 50% width and floated to the right so that the text flows around it - using in fact markup I got from Elizabeth Castro's book. These images look good on my Sony though I haven't set height or width. And the exact same image with the exact same markup looks superb on the iPad. It certainly has not expanded to the full width of the screen. I don't doubt your experience or expertise for a moment, but I do have the image on the iPad in front of me. So I'm even more confused that I was. |
|
![]() |
![]() |
![]() |
#8 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
They may have fixed that, there have been a couple of updates to iBooks since the image issues first came out and I had to use the code from her blog to fix them. Been using it ever since so maybe it isn't needed any more. That would be nice. Maybe I will try and go back and remove it from some epubs and reload them on the iPad and see what happens now.
|
![]() |
![]() |
![]() |
#9 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
Oh one question, are you putting the size constraints in the image tag or in a container around the image tag?
|
![]() |
![]() |
![]() |
#10 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
Code:
div.illustration { margin: 0 0 0 0.5em; padding: 0; border: 1px solid black; width: 50%; float: right; } div.illustration img { border: 0; margin: 0; padding: 0; width: 100%; display: inline; } div.illustration p { margin: 0; padding: 0; text-align: center; text-indent: 0; font-size: smaller; } /* With thanks to Elizabeth Castro */ div.illustration+p {text-indent: 0;} /* No indent for 1st para after an illustration */ Code:
<div class="illustration"> <img src="images/ch03Luc.png" alt="Luc and macaw"/> </div> |
|
![]() |
![]() |
![]() |
#11 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
|
Okay, you are doing exactly what I was taking about then.
Checked last night with one of my epubs since I am using Apple's betas on my iPad at the moment and the issue still exists so they haven't changed anything. |
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks.
|
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,712
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
How does one get a covert to show in the iBooks bookcase and to open at the cover? I have some ePub that do not show the cover properly in the bookcase. Thanks.
|
![]() |
![]() |
![]() |
#14 | ||
Media Bloke
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,382
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
|
Quote:
Add the bold meta statement to your opf file refering to the cover image. Refer to it in the manifest. To make it open at the cover add the guide statement Quote:
|
||
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
<meta name="cover" content="img1" /> {last line of metatdata} <item id="img1" href="images/Cover.png" media-type="image/png" /> {from the manifest} <item id="id1" href="Coverpage.html" media-type="application/xhtml+xml"/> {from the manifest} <guide> {just after the manifest} <reference type="cover" href="Coverpage.html" /> </guide> Last edited by AlexBell; 09-16-2011 at 01:10 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
iPad iPad custom dictionary to iBooks | kidpixo | Apple Devices | 0 | 04-29-2011 05:06 AM |
iPad upgrade to V4 and iBooks. | RCR | Apple Devices | 0 | 11-23-2010 01:23 AM |
Landscape format on ibooks and iPad | splinters | ePub | 6 | 10-29-2010 12:02 PM |
iBooks 1.1 out for iPhone and iPad | kjk | Apple Devices | 99 | 06-28-2010 05:18 PM |
iBooks on iPad to be U.S. ONLY??? | TallNHairyDave | News | 15 | 01-28-2010 09:42 PM |