![]() |
#1 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Format Looks Great in Sigil, but not on Device
I created a book from scratch today and ran into a snag.
On Sigil: 1) I did all work in code view 2) All looks as it should in preview and book view 3) I used Flight Crew and had no issues 4) I linked the Style sheet and as in #2 all looks fine BUT... on both Nook and Kobo the CSS seems to be ignored all together. When I tossed the epub into iBook it respected the CSS. That is not what I am used to. What could I have done wrong in Sigil? Here is the CSS in case anyone can point out an issue. p{ text-indent: 5%; text-align: justify; font-size: 100%; } .s1{ text-indent: 0%; text-align: center; font-size: 120%; font-weight: bold; } .s2{ text-align: left; padding-left: 30%; text-indent: 0%; font-size: 85%; } .s3{ text-align: justify; text indent: 0%; font-style: italic; font-size: 85%; } .s4{ text-indent: 0%; text-align: center; font-size: 100%; } .s5{ text-indent: 0%; text-align: center; font-size: 100%; font-style: italic; } .s6{ text-indent: 0%; text-align: center; font-size: 105%; font-weight: bold; } .c1{ font-style: italic; } .stanza { margin-top: 1em; margin-right: 0; margin-bottom: 1em; margin-left: 2em; text-align: left; } .stanza p { padding-left: 2em; text-indent: -2em; } .image{ text-align: center; } body, div, p, h1, h2, h3, h4 { margin: 0; padding: 0; } |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,309
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Why not attach either the whole book or a stripped down version of it with one or two chapters... It's far easier for us to look at a complete work than just one fragment of it (the css).
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Entire epub file
Ok,
Here is the book. It is public domain, so no issue there. I appreciate the guidance. |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Also,
it was suggested by some folks on here that as a learning exercise I attempt to code the whole thing myself rather than exporting as an epub file from Pages off a Mac. I took the advice. If anyone sees that I am doing something incorrectly, please let me know so I can do better with the code in the future. I tried to take all the advice from previous posts about using classes. |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,309
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
One obvious error:
Code:
.s3{ text-align: justify; text indent: 0%; font-style: italic; font-size: 85%; } Remember some renderers will ignore the ENTIRE css if there is an error in it... Also; it's thought inadvisable to have "spaces" within file names in the ePub. Maybe rename items like: Cover Manual of Prayers.jpg to Cover_Manual-of_Prayers.jpg Last edited by PeterT; 12-13-2014 at 12:19 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Thank you. That fixed the problem on both devices. I am glad it was something so minor.
I tried to use the tool "Validate with W3C" to check the CSS before I posted originally. What does that tool do exactly? It didn't seem to do anything. |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,309
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
When I used the tool it brought up a web page which showed an error in the CSS
![]() |
![]() |
![]() |
![]() |
#8 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Any idea of that tool is not part of Sigil for Mac? I can't seem to get it to do anything at all.
I will look into changing the names of the files to eliminate spaces. I haven't run into any problems as of yet with the spaces, what is the issue with them? |
![]() |
![]() |
![]() |
#9 |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
I did put the file in calibre after you found the issue and it found the same error. I can do that from now on, but if I can get the "Validate with W3C" to work on my Mac that would be even better
|
![]() |
![]() |
![]() |
#10 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
IIRC this feature it is also not working in the windows version of Sigil for a long time now.
So I simply use the direct link to the validator: http://jigsaw.w3.org/css-validator/#validate_by_input and copy in my css manually. Remember to set the validator to check against CSS2.0 oder 2.1 HTH |
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,682
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
<shameless plug>You can also use my Sigil epubcheck plugin, which I had to update because of your file, because I didn't anticipate CSS error messages without line positions.</shameless plug> (Even though FlighCrew and ePubCheck will often report exactly the same issues, I'd recommend running both.) |
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#13 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,682
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
I had problems with the Linux version in the past: css files were automatically opened with Geany (a text editor) instead of the web browser. Uninstalling and re-installing Geany fixed the problem. @Mark Nord: If the css file opens with a text editor, when you select Validate with W3C, uninstalling and reinstalling the text editor might help. If selecting Validate with W3C doesn't open an editor, changing or deleting the open with file association for .css files might help. |
|
![]() |
![]() |
![]() |
#14 | |
Zealot
![]() Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
|
Quote:
I did copy my CSS to the various links that people provided here and it found the error right away. I realize flight crew doesn't check the CSS...That is why I was pretty sure the issue was in the CSS rather than in one of the files. |
|
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,682
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If so you might have to change this file association. Since both KevinH and user_none use Macs, they can probably give you more specific pointers. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil loses format in bulleted list | mlamb | Sigil | 17 | 03-20-2014 04:35 AM |
Audio in epub format using sigil | TStphnsn | Sigil | 6 | 10-27-2012 04:39 PM |
List format in Sigil | crutledge | Sigil | 4 | 07-23-2012 02:22 PM |
Preserving format from ePub (Sigil) to Mobi | jeff47 | Calibre | 9 | 10-22-2010 10:17 PM |
SIGIL format | DaleDe | Sigil | 7 | 10-13-2009 11:00 AM |