10-22-2010, 10:32 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2010
Device: a few
|
ADE won't use Sigil css file
I'm having trouble getting ADE to use the css file that I created in Sigil. In Book View, everything looks fine. But when I open the epub in ADE, the formatting is gone and ADE displays the book in default
. The individual chapters have: Code:
<style type="text/css"> <link rel="stylesheet" href="../Styles/main.css" type="text/css"/> </style> Code:
<style type="text/css"> h3.center {text-align: center;} h4.center {text-align: center;} p.sgc-3 {text-align: center;} p.sgc-5 {font-style: italic; text-align: justify; margin: 0;} p.noind {text-align: justify; margin-top: 0; margin-bottom: 0; padding: 0; text-indent: .25in;} blockquote.sgc-11 {margin: 0 0 40px; border: none; padding: 0px;} </style> |
10-22-2010, 10:51 AM | #2 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
remove the html code from the css file. The first and last lines from your example.
|
Advert | |
|
10-22-2010, 11:52 AM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2010
Device: a few
|
I removed the html from the css file, and while it looks good in Book View, ADE still will not display the formatting.
Edit: also, if I put the css in the head of the individual chapter, then ADE displays the formatting correctly. Last edited by Phanes; 10-22-2010 at 12:12 PM. Reason: another point too... |
10-22-2010, 12:20 PM | #4 |
Sigil Developer
Posts: 8,104
Karma: 5450184
Join Date: Nov 2009
Device: many
|
FYI: Any little mistake in the css sheet at all will cause ADE to ignore it completely. I found this out the hard way. Drove me crazy.
So you might want to triple check that everything you have in the file is proper css. FWIW, KevinH |
10-22-2010, 12:49 PM | #5 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
For instance:
margin: 0 0 40px; As far as I know, you can specify 1, 2 or 4 values for margin, but not 3. And are you sure you want to use "px" and "in" as units? Pixels are very device-specific, two screens with the same size but with different resolution will have different margins. Inches are quite absolute, no matter how big or small the screen and the font, they stay the same. You might consider using percent lengths or "em". |
Advert | |
|
10-22-2010, 01:13 PM | #6 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2010
Device: a few
|
I cleaned up the css file. Used em and also got rid of the sgc-# that Sigil generated. Here is what I have:
Code:
h3 { text-align: center; } h4 { text-align: center; } p.center { text-align: center; } p.ital { font-style: italic; text-align: justify; margin: 0; } p.ind { text-align: justify; margin-top: 0; margin-bottom: 0; padding: 0; text-indent: 1em; } blockquote { margin-left: 1.5em; border: 0; padding: 0; } |
10-22-2010, 01:29 PM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2010
Device: a few
|
Found the problem.
I had: Code:
<head> <style type="text/css"> <link rel="stylesheet" type="text/css" href="../Styles/main.css"/> </style> </head> Code:
<head> <link rel="stylesheet" type="text/css" href="../Styles/main.css"/> </head> |
Tags |
css, sigil |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Styling Elements in CSS - ADE and Sony | toskpro | Sony Reader | 0 | 07-19-2010 01:55 PM |
Sigil styles and CSS | View[+]Finder | Sigil | 4 | 05-27-2010 05:39 PM |
ADE mit userstyle css | mtravellerh | PocketBook | 0 | 05-21-2010 03:40 PM |
Sigil and CSS files | crutledge | Sigil | 6 | 05-20-2010 09:02 AM |
epub, ADE and CSS puzzle | pdurrant | ePub | 3 | 09-03-2009 01:07 PM |