Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2011, 06:43 AM   #1
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
[done] Multiple CSS

Hello,

Is there a specific way to use muliple CSS's in ePub ?
I do have two CSS, standard names, section ponting to the correct CSS

But in ADE and other reader, it's like the CSS's doesn't exist anymore

Thanks
GE

Last edited by Gray Eminence; 01-13-2011 at 10:15 AM.
Gray Eminence is offline   Reply With Quote
Old 01-13-2011, 06:51 AM   #2
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: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You can use as many CSS files as you want, but you have to reference them in the XHTML files. Look for something like:

Code:
<head>
  <title>Part IV &mdash; Chapter XII</title>
  <link href="css/style.css" type="text/css" rel="stylesheet" />
</head>
You can add more <link href="..." /> lines as needed.
Jellby is offline   Reply With Quote
Advert
Old 01-13-2011, 07:02 AM   #3
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
I do have the following, which work in Sigil :

Quote:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../Styles/style001.css" rel="stylesheet" type="text/css" />

<title></title>
</head>

and


Quote:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../Styles/style0001.css" rel="stylesheet" type="text/css" />

<title></title>
</head>

And still, ADE seems to ignore them
Gray Eminence is offline   Reply With Quote
Old 01-13-2011, 07:34 AM   #4
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: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
There might be a syntax error, misspelling or unrecognized keyword in the CSS file, ADE tends to ignore everything as soon as it finds something it doesn't like.
Jellby is offline   Reply With Quote
Old 01-13-2011, 08:19 AM   #5
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
Definitivelly not a syntax issue "in the css", it look smore like a pointing issue.
I did copy all second CSS code in the first one and it works.

The style001.css works
If I rename it to style0001.css (all sections pointing to it), it's not working anymore. Like ADE only abble to accept the style001 and nothing else.

What sounds illogic based on your comments, it should work


PS : i renamed the 0001 in 001, and surprise, it doesn't work back, looks like Sigil is messing something to the pointing codes

Last edited by Gray Eminence; 01-13-2011 at 08:26 AM.
Gray Eminence is offline   Reply With Quote
Advert
Old 01-13-2011, 08:26 AM   #6
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: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Do you also change the name in the OPF file?
Jellby is offline   Reply With Quote
Old 01-13-2011, 08:43 AM   #7
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
Quote:
Originally Posted by Jellby View Post
Do you also change the name in the OPF file?
Nope, not yet that far in my learning.

I would had expected Sigil to do it .....

I will leanr somthing new then
Gray Eminence is offline   Reply With Quote
Old 01-13-2011, 09:52 AM   #8
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
Seems it's correct in the opf

Quote:
<item id="Style0001.css" href="Styles/Style0001.css" media-type="text/css"/>
<item id="style001.css" href="Styles/style001.css" media-type="text/css"/>
Gray Eminence is offline   Reply With Quote
Old 01-13-2011, 10:10 AM   #9
Gray Eminence
eBook Designer
Gray Eminence began at the beginning.
 
Gray Eminence's Avatar
 
Posts: 17
Karma: 10
Join Date: Jul 2010
Location: Brussels
Device: PRS-650 / NookGlow / Paperwhite / iPad / AsusTransformer
case-sensitive

When sigil create the original CSS, it's called style001
When it creates a new one, it's called Style0001 (note the S instead of s)

Of course, when I edited my section link , I just added a 0, and it works fine in Sigil. But ADE seems to be more case-sensitive than Sigil.


There is something weird in Sigil to maybe change in a future release (the first with s and next ones with S is strange to me)

Thank you Jellby for you appreciated help and time

Cheers,
GE
Gray Eminence is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
<Command Line> Add multiple books in multiple formats himitsu Calibre 8 09-25-2010 11:07 PM
Multiple CSS Files jjm6383 Sigil 2 06-28-2010 05:44 PM
Bug: entries with multiple formats trigger multiple conversions flinx1 Calibre 12 05-21-2010 06:23 AM
Help with CSS, anyone? rogue_ronin Workshop 36 08-14-2009 09:28 PM


All times are GMT -4. The time now is 04:26 AM.


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