Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-22-2010, 10:32 AM   #1
Phanes
Junior Member
Phanes began at the beginning.
 
Phanes's Avatar
 
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>
The css file has:

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>
Any ideas?
Phanes is offline   Reply With Quote
Old 10-22-2010, 10:51 AM   #2
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,535
Karma: 4597368
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
remove the html code from the css file. The first and last lines from your example.
DaleDe is offline   Reply With Quote
 
Enthusiast
Old 10-22-2010, 11:52 AM   #3
Phanes
Junior Member
Phanes began at the beginning.
 
Phanes's Avatar
 
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...
Phanes is offline   Reply With Quote
Old 10-22-2010, 12:20 PM   #4
KevinH
Guru
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 833
Karma: 349410
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
KevinH is offline   Reply With Quote
Old 10-22-2010, 12:49 PM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,043
Karma: 4347035
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".
Jellby is online now   Reply With Quote
Old 10-22-2010, 01:13 PM   #6
Phanes
Junior Member
Phanes began at the beginning.
 
Phanes's Avatar
 
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;
}
Still, ADE won't accept it, but looks good in Sigil.
Phanes is offline   Reply With Quote
Old 10-22-2010, 01:29 PM   #7
Phanes
Junior Member
Phanes began at the beginning.
 
Phanes's Avatar
 
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>
I now have:
Code:
<head>
  <link rel="stylesheet" type="text/css" href="../Styles/main.css"/>
</head>
Thanks
Phanes is offline   Reply With Quote
Reply

Tags
css, sigil

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 09:02 AM.


MobileRead.com is a privately owned, operated and funded community.