Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2020, 11:49 AM   #1
mossman26
Junior Member
mossman26 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2020
Device: iPhone
Linking to CSS stylesheet

What can I be missing? My stylesheet CSS is not being applied to my HTML file. Inline CSS in the HTML file works fine. See attached screenshot.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2020-07-16 at 11.47.38 .png
Views:	290
Size:	69.0 KB
ID:	180685  
mossman26 is offline   Reply With Quote
Old 07-16-2020, 12:11 PM   #2
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by mossman26 View Post
What can I be missing? My stylesheet CSS is not being applied to my HTML file. Inline CSS in the HTML file works fine. See attached screenshot.
The path (href) is incorrect; it's a relative path so it should start with ../Styles/; dot dot goes up, then it goes down into the Styles folder.

The best (easiest) way to link the CSS file is to right click on the html/xhtml file in the Book Browser and from the popup select Link Stylesheets...

Last edited by hobnail; 07-16-2020 at 12:13 PM.
hobnail is offline   Reply With Quote
Advert
Old 07-16-2020, 02:38 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by hobnail View Post
The path (href) is incorrect; it's a relative path so it should start with ../Styles/; dot dot goes up, then it goes down into the Styles folder.
That's not necessarily true. The latest versions of Sigil will allow people to create epubs with all files in the same folder (or right at the root of the zip archive) if they so choose. So it could be a valid ebook path.

Quote:
Originally Posted by hobnail View Post
The best (easiest) way to link the CSS file is to right click on the html/xhtml file in the Book Browser and from the popup select Link Stylesheets...
That's solid advice. No matter the internal structure of the epub happens to be, Link Stylesheets will add it with the correct path.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pagestyle.css extra / integrated in stylesheet.css / or not at all? chaot Workshop 14 02-24-2017 11:10 PM
Stylesheet not linking Filomena Workshop 3 11-12-2016 07:41 PM
stylesheet.CSS anyone? ProDigit ePub 81 12-26-2015 01:43 PM
Linking Stylesheet with Text Ephraim Sigil 2 12-07-2010 05:38 PM
Where is the stylesheet.css? roger64 Sigil 4 03-23-2010 02:12 PM


All times are GMT -4. The time now is 10:18 PM.


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