11-17-2011, 08:27 AM | #1 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
|
text alignment issue
Hi, m trying to develop an epub for ipad... aligned my entire book text justified.. but only two of the chapters are accepting justification rest are appearing left in ipad ... anyone having idea of the issue plz.. help thnks
|
11-17-2011, 10:41 AM | #2 | |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
switch to CV (code view) and work from the inner style out. (x)html is just boxes of letters/pictures stacked or side-by-side inside other boxes. see http://www.w3.org/TR/CSS2/box.html. A Paragraph is typically a block level box, sometimes folks wrap (1 or more) those in a Div (outer box). the Div now constrains the P. |
|
Advert | |
|
11-21-2011, 08:10 AM | #3 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
|
there is no problem in sigil... entire text just look fine(i.e justified) there, the problem arises when the book is opened in ipad ... only some of the text is appearing justified rest is left ..
|
11-21-2011, 10:15 AM | #4 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Possible typo in the CSS file? You can paste the contents of your CSS file here to check it. Sigil is very forgiving of missing or incorrect colons/semicolons. Try opening the epub in Adobe Digital Editions or Sony Reader Library and see if the behaviour is the same there.
|
11-21-2011, 10:49 AM | #5 | |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
ADE also is unforgiving. Stuff that Sigil/Calibre displays fine, ADE barfs on Edit: BTW There is a free CSS validation service at W3: http://jigsaw.w3.org/css-validator/#validate_by_upload Last edited by theducks; 11-21-2011 at 10:53 AM. Reason: added link |
|
Advert | |
|
11-21-2011, 02:53 PM | #6 | |
Guru
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
|
|
11-21-2011, 03:12 PM | #7 |
Wizard
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
I don't agree.
Since there are two chapters that display as intended and several others that don't the CSS, at least those styles used in the first 2 chapters, is well enough formatted for iBooks to handle correctly. The fact that the formatting changes beginning at chapter 3 indicates that there is some change in the (x)html document construction that begins in chapter three and is repeated or inherited throughout the rest of the (x)html document(s). This change could be a typo at the end of chapter 2 or at the beginning of chapter 3. It could also be a design change. Types of design changes that could easily have this affect include:
Last edited by dwig; 11-21-2011 at 03:14 PM. |
11-21-2011, 10:52 PM | #8 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
I'm not so sure of that. According to shaina's second post the entire text shows justified in Sigil which it should not if there were anything incorrect with the xhtml or if there were any changes or different styles like you describe. Not knowing iBooks behaviour with regards to typos in the CSS file is why I recommended opening the epub in ADE, which will show no formating if there are any typos in the CSS.
|
11-22-2011, 02:24 AM | #9 |
Member
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
|
All the alignment looks fine in ADE too... and there is no issue with css or <p> tag formatting bcoz if i try to give entire book right/center alignment .. its acceptable .. issue arises with justify alignment only ...n plz dont think there might b some mistake in css... bcoz book looks fine in sigil n ADE both issue arises only when we view in ipad
|
11-22-2011, 10:46 AM | #10 | |
Wizard
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
Since the error only occurs in the display of a portion of the document, or in some of the (x)html files, it is all but impossible for the error to be in the CSS stylesheet. An error in the stylesheet would affect the whole document, not just a portion. The only way a stylesheet error could be causing this behavior is if the <p> tags in chapt 1-2 have one style applied and chapt 3-... have a different style and the style used in chapt 3-... contains a typo that Sigil is correcting for on the fly. Even if this is the case, resolving it would be much easier if the (x)html code used for chapt 2 is carefully compared to that used for chapt 3 to expose the difference. You could then know what coding error/difference in chapt 3-... causing the problem. It may point to a different CSS style that needs fixing and may indicate some other error. |
|
11-22-2011, 11:40 AM | #11 | |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It may also be possible for the <body> to not have the same/no style applied |
|
11-22-2011, 11:41 AM | #12 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
ADE/sony give up at the 1st CSS typo & ignore all other style rules. PS sometimes it is faster to run epub to epub conversion in calibre than to stare at the code looking for errors. calibre will auto fix many bugs otherwise stare hard at the lines in XHTML which link to the stylesheet, an error there can lead to not seeing styles applied in the head section you should have something like this <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" /> <style type="text/css"> Last edited by cybmole; 11-22-2011 at 11:45 AM. |
|
11-22-2011, 11:42 AM | #13 |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Isn't there an option in the iBooks settings to be justified?
|
11-22-2011, 02:26 PM | #14 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Correct JSWolf, that is what I am thinking too. We have seen it earlier on the forum with regards to justification and iBooks.
Check the default justification setting in iBooks. |
11-22-2011, 03:34 PM | #15 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vertical text alignment OCR | bookmeal | Workshop | 7 | 11-14-2011 04:28 PM |
Hello/Image and text alignment | Derek R | Introduce Yourself | 3 | 06-26-2011 11:47 AM |
PRS-650 Text and alignment issues | henders254 | Sony Reader | 0 | 05-14-2011 09:11 PM |
Text Alignment Problem | fan of kovid | Conversion | 15 | 03-20-2011 06:39 PM |
Text alignment | James_Wilde | iRiver Story | 0 | 10-25-2010 05:22 AM |