![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Nov 2016
Device: none
|
Stylesheet not linking
I am a student and have an assignment to create an epub with a stylesheet. When I did create the stylesheet it created an error:
W3 said it had no errors on my css I was not sure how to do it but I look at another girl style sheet and use it...modified it to my book but It did not work had error. did not link. I posted to my professor and sent the below response ...I am not sure what he means. Here is my css sheet file:///C:/Users/Filomena/Documents/UA/575%20USER%20INTERFACE%20and%20WEB%20DESIGN/PROJECT%202/stylesheet3.html Any thoughts ...? ![]() |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 972
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-T2, Kindle Paperwhite 11th gen
|
Your stylesheet is called stylesheet3.css, yet (according to your teacher) in your xhtml file your are referencing stylesheet.css. You also include a reference to page_styles.css, but that file is not part of your ePub, as far as I can see.
You can have as many stylesheets as you like in your ePub, and use as many of them in each xhtml file as you want, but you have to include references, in each xhtml file, to the stylesheets you want to apply to that file. Including a stylesheet in your ePub has no effect until you include a reference to it somewhere. That's the error you see in calibre editor. Last edited by Pablo; 11-08-2016 at 12:50 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,313
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If you use an editor like Sigil (I assume Calibre does this as well, but I'm not sure how) you need to tell it to link the stylesheet and the editor will insert all of those lines on each html for you.
Here's how in Sigil (should be very similar in Calibre): - Highlight all of the html files in your book browser (File Browser) that you wish to link - Right click on one of those html files and select "Link Stylesheets" - Put a check in the box(s) next to the stylesheets you wish to link, and select OK Cheers! |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Note in Sigil:
If you use the Link Stylesheet tool ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
stylesheet help | arethusa | ePub | 6 | 07-02-2013 12:03 PM |
Linking to an image | EbookNoob | ePub | 9 | 05-12-2013 02:39 AM |
How NOT to use a stylesheet? | karyan | Sigil | 12 | 03-07-2012 12:43 PM |
Linking Stylesheet with Text | Ephraim | Sigil | 2 | 12-07-2010 05:38 PM |
What are you linking? | gvtexas | Lounge | 14 | 02-29-2004 12:11 AM |