01-15-2011, 01:57 AM | #1 |
Connoisseur
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
|
External CSS file questions
Greetings:
I'm new to Sigil, so if there's additional info required/missing, please let me know. I'm trying to use external CSS file, I've created a very simple external CSS called michael.css and saved it in the same folder as HTML file, this is what I did: 1: Load the HTML file into an external editor. 2: Place the following code into the HTML file (between <head> tag): Code:
<link rel="stylesheet" type="text/css" href="michael.css" /> 4: Open the Styles Section and the michael.css has been loaded. The problem is when I tried to save the HTML file into ePub, Sigil inserted the following code into ePub file, Code:
<style type="text/css"> p.sgc-6 {font-style: italic; font-weight: bold} b.sgc-5 {font-style: italic} p.sgc-4 {font-style: italic} span.sgc-3 {font-size: 16pt;} p.sgc-2 {font-weight: bold} span.sgc-1 {font-size: 24pt;} </style> Code:
p.sgc-6 {font-style: italic; font-weight: bold} b.sgc-5 {font-style: italic} p.sgc-4 {font-style: italic} span.sgc-3 {font-size: 1.5em;} p.sgc-2 {font-weight: bold} span.sgc-1 {font-size: 2em;} Thanks for your comment/suggestions Michael |
01-15-2011, 11:06 AM | #2 | |
Well trained by Cats
Posts: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
<link rel="stylesheet" type="text/css" href="../Styles/michael.css" />
|
|
Advert | |
|
01-15-2011, 12:31 PM | #3 |
Enquiring Mind
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
|
@ theducks : #2 is what is in the original HTML file, before loading it into Sigil, and is correct if the original CSS file is in the same directory as the original HTML file. I would imagine that after loading it into Sigil, Sigil will have changed the CSS path to "../Styles/michael.css", to correspond with the new directory structure set up by Sigil.
@ michaelbr : I believe Sigil is creating those styles to replace formatting that has been applied within the HTML code rather than through the use of CSS (e.g. occasional use of <i> and <b> tags). The only way to stop this happening, as far as I know, is to ensure that all formatting is already handled via the CSS styles. However the styles created by Sigil are not replacing the existing styles in your CSS file, and don't prevent those from being used - they are simply in addition to those styles. |
01-15-2011, 12:51 PM | #4 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
|
|
01-15-2011, 04:41 PM | #5 |
Enquiring Mind
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
|
|
Advert | |
|
01-16-2011, 11:49 PM | #6 |
Connoisseur
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
|
Thanks for all your replies, we learn little bit everyday.
|
01-17-2011, 10:53 PM | #7 |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
|
01-17-2011, 11:43 PM | #8 |
Well trained by Cats
Posts: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
01-18-2011, 08:42 AM | #9 | |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
Quote:
I guess these old eyes tend to entropy like the rest of me. I see it now. But I don't know which is which. When Sigil is opened, is it on or off? If it is on when opened, I'll have to change my ways. I navigate to the file, right click and "open with" as opposed to opening the file within Sigil. I find it much easier to navigate with windows explorer. Regards - John |
|
01-18-2011, 10:27 AM | #10 | |
Well trained by Cats
Posts: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
In is on (edges darker) |
|
01-27-2011, 08:08 AM | #11 |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
The status is preserved since the last Sigil session.
You can also look in the Tools menu, the enabled/disabled status is indicated by a tick mark next to "Cleaning with HTML Tidy". |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Opus Fonts directory for Calibre -> External CSS | fiery | Bookeen | 12 | 02-20-2011 10:05 PM |
a few extra css questions | marbs | Recipes | 12 | 11-20-2010 10:15 AM |
CSS Questions | JTAL604622 | Calibre | 0 | 11-18-2010 06:33 PM |
EPUBReader doesn't find the CSS file? | paulpeer | EPUBReader | 8 | 03-23-2010 02:45 PM |
Questions about external memory | siulayhumga | Sony Reader | 4 | 06-17-2009 12:44 PM |