MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   ADE won't use Sigil css file (https://www.mobileread.com/forums/showthread.php?t=103605)

Phanes 10-22-2010 11:32 AM

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?

DaleDe 10-22-2010 11:51 AM

remove the html code from the css file. The first and last lines from your example.

Phanes 10-22-2010 12:52 PM

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.

KevinH 10-22-2010 01:20 PM

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

Jellby 10-22-2010 01:49 PM

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".

Phanes 10-22-2010 02:13 PM

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 10-22-2010 02:29 PM

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


All times are GMT -4. The time now is 05:59 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.