01-28-2014, 03:11 PM | #1 |
Enthusiast
Posts: 34
Karma: 10
Join Date: Jan 2014
Device: Nook
|
Where To Put <style type="text/css"> Code
I built an epub file that has many html files in it. Every html file has the following code.
Code:
<head> <title>Only Remembered</title> <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css"/> <link href="../Styles/page_styles.css" rel="stylesheet" type="text/css"/> <style type="text/css"> h2.sgc-1 {text-align: center;} h3.sgc-2 {text-align: center;} body.sgc-3 {word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;} </style> </head> |
01-28-2014, 03:21 PM | #2 | |
Well trained by Cats
Posts: 29,952
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Note: SGC Page styling as you show is NOT transferable between pages. SGS# are assigned in the order used ON THAT FILE so on one page SGC-1 might be used by: h3.SGC-1 {text-align:center; font-style: italic; } and another page h2.SGC-1 {text-align:center; font-weight: bold; } Create your own style selectors and replace the each class="with newname" |
|
Advert | |
|
01-28-2014, 03:44 PM | #3 | |
Enthusiast
Posts: 34
Karma: 10
Join Date: Jan 2014
Device: Nook
|
Quote:
I have two css files in the epub file with the rest of my formatting.
|
|
01-28-2014, 04:04 PM | #4 |
Well trained by Cats
Posts: 29,952
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
As long as they are linked to the pages:
In the file browser: Select all the files that make up the main body (content, usually not the boilerplate files:titlepage,coverpage) rightclick: Link stylesheet: tick BOTH CSS you list as any existing usage not ticked will be deleted. There is no need of the infile CSS if you cover those cases in the main CSS h2, h3 {text-align: center; } centers all H2 and H3.. Anyplace in the book |
01-28-2014, 08:33 PM | #5 |
Enthusiast
Posts: 34
Karma: 10
Join Date: Jan 2014
Device: Nook
|
Thank you.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Suggestion] Sigil validator should check missing type="text/css" attribute | quiris | Sigil | 13 | 01-21-2018 02:00 PM |
CSS to "wrap" text between two .xhtml files? | december | Sigil | 28 | 12-06-2013 03:29 PM |
Sigil eBook Editor, Would Like To Put "Remarks" in Code View Not To Appear in... | Al Adams | Sigil | 5 | 09-04-2013 09:35 AM |
Using a CSS "style reset" | santosha | Kindle Formats | 11 | 06-29-2013 12:01 AM |
ePub to Mobi: can't get the reference type="text" to work | LaoTseu | Conversion | 7 | 09-14-2011 12:06 AM |