![]() |
#1 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: iPhone
|
ibooks - cover image bleeds over to page 2
Hello!
I have a problem with an epub file i'm currently working on. I've seen other threads on this forum where people with problems similar to mine have asked for help, but eventhough I've tried as best I can I still can't seem to get this issue fixed. Hopefully posting here will help. All right, my problem is this: I have created this epub file in Sigil, and everytime i open it i ibooks the lower part cover image seems to "bleed" over on page 2 - showing the lower most part of the cover image sort of like a bar or a thin banner at the top of page 2. The rest of page 2 is always blank. I've tried adding a height=99% line to the code, without success. This is what the xhtml page says in code view: Quote:
Does anybody know how to fix this? The rest of the epub reads absolutely fine, it's just this annoying thing. I should perhaps also mention that when it comes to html and codes n' stuff, I'm a total n00b. I should also mention that i'm reading the epub on an iPhone, but the problem is the same on the iPad (iBook). Also, it doesn't really seem to matter wheter i open the file in iBook, Kobo or NeoSoarBook. I would be exeremly grateful if anyone could help! |
|
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,886
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Why is there a <br />
Why no class= xxx (use a stylesheet) with margins as well as your 'center' You are accepting the readers defaults when not explicit |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
You should lose the <br />
Also lose the <h3>. Readers tend to add padding under a header. <body style="margin:0;padding:0"> might be a good idea. Link to a stylesheet if you want, but as a book is likely to have only one cover it's no great sin to leave this one page unlinked and use inline code. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: iPhone
|
Thank you for your advice!
After removing the "<br />" and "<h3>" and adding the "<body style="margin:0;padding:0">" the cover no longer bled over on to page 2. Instead the epub now has a blank page before the cover image, and a blank page after it. Any ideas? |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
<body style="margin:0;padding:0"> should REPLACE the existing <body> tag. Sorry if that wasn't clear. Did you add it as an extra?
Last edited by exaltedwombat; 04-22-2013 at 11:26 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: iPhone
|
|
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
OK. Show us the revised page of code, then.
|
![]() |
![]() |
![]() |
#8 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: iPhone
|
The code for the cover page as of present:
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,886
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Doesn't P have its own default margins?
Those may need to be set also |
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
<div> instead of <p> will get rid of any built-in paragraph styling. The height setting may not agree with Sigil Preview, but I think a reader will cope.
Have you set the semantics for both cover page and cover image? <?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Omslag</title> </head> <body style="margin: 0px; padding: 0px;"> <div style="text-align: center;"><img alt="omslag7f" src="../Images/omslag7f.jpg" height="100%" /></div> </body> </html> |
![]() |
![]() |
![]() |
#11 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,295
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
That's certainly better, although I would put all styling (body, img, and div) in a CSS. I would also add a style definition for img to make sure it stays with the correct aspect ratio no matter the dimensions of the display:
Code:
body {margin:0; padding:0} img {max-height:100%; max-width:100%} div.cover{text-align:center; text-indent:0; margin:0 auto} <body> <div class="cover"><img alt="Omslag" src="../Images/omslag7f.jpg" /></div> </body> Code:
h1[title=Cover] {display:none} <body style="background:url("e;../Images/omslag7f.jpg"e;) no-repeat fixed center center; background-size:contain"> <h1 title="Cover"></h1> </body> Cheers! Last edited by Turtle91; 04-22-2013 at 12:46 PM. |
![]() |
![]() |
![]() |
#12 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: iPhone
|
The problem seems to be solved now. I changed the <p> tag to a <div> (basically I copied a non strange-looking epub book and basically did what they did), and replaced the cover jpg with a one sized 600 x 800 px. The cover is on page 1 of the epub document i ibooks and looks good on the ipad.
I would like to thank everybody for assisting yours truly! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil adding blank page after cover image | ebookn00b | Sigil | 32 | 06-20-2013 01:44 PM |
How to preview first EPUB embedded image (not cover page!) | Mdemaillard | Library Management | 7 | 01-14-2013 04:06 AM |
Script to scrape page for a cover image for recipe? | adoucette | Recipes | 12 | 02-29-2012 06:24 PM |
g cover image without losing first page of text | fictionaddiction | Conversion | 1 | 07-22-2011 02:27 PM |
iBooks, Table of Contents, Missing Cover image. | Daddy Warpig | Apple Devices | 2 | 04-15-2010 10:09 AM |