| 
			
			 | 
		#1 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 20 
				Karma: 10 
				Join Date: Mar 2017 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Newbie question about <Styles> and tooltips
			 
			
			
			I frequently run into this problem - trying to implement a style by including the <Style> section inline with the HTML code (Section0001,xhtml), works the way it's supposed to. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Placing the <Style> section in a blank stylesheet (Style0001.css), however, doesn't. For example, trying to form tooltips using code from https://chrisbracco.com/a-simple-css-tooltip/ or from http://netdna.webdesignerdepot.com/u...ltip_demo.html works only when the Style is inline. I have also encountered this problem with styles unrelated to tooltips. Any idea why? Thanks.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			because, <style> is a special inline tag pair that signifies the contents is a stylesheet 
		
	
		
		
		
		
		
		
		
		
		
		
	
	You link stylesheets, the link specifies what type of link Sigil does all the dirty work for you. Right-click the filename (to link): Select 'Link Stylesheets: TICK all that apply (those that are NOT ticked will unlink): apply That is it  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Member 
			
			![]() Posts: 20 
				Karma: 10 
				Join Date: Mar 2017 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I didn't realize that I have to actively link Stylesheets which are part of the same document as the HTML page...  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Did you, perhaps mean, "part of the same EPUB"? I only ask because you don't have to link styles that are part of the same HTML page. You only have to link stylesheets to html pages when they ARE, in fact, separate documents/files.
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by DiapDealer; 03-14-2017 at 02:32 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Member 
			
			![]() Posts: 20 
				Karma: 10 
				Join Date: Mar 2017 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Test 2 - created yet another new EPUB in Sigil. Pasted the HTML code in a new HTML sheet; then went to Add/Blank Stylesheet, pasted the CSS code in that new Stylesheet: this time it didn't work. Finally, using the advice above, went to the HTML sheet, clicked on Link Stylesheets, linked the new Stylesheet - and, lo and behold, it worked again! As I mentioned, it doesn't make sense to me that Sigil won't do the linking by itself (to Styles in the same EPUB), but this is where it seems to be.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 mostly an observer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519 
				Karma: 996810 
				Join Date: Dec 2012 
				
				
				
				Device: Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Since there are circumstances when your style pointer might not appear in all files (for example, if you split the epub before you think to add the style sheet), you might find it useful to save a working link. This is mine, by way of example: 
		
	
		
		
		
		
		
		
		
		
		
		
	
	<link href="../Styles/epub.css" rel="stylesheet" type="text/css"/>  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 20 
				Karma: 10 
				Join Date: Mar 2017 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Sorry, but as a newbie, I have to ask: so you would add this link in each HTML file in the EPUB?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				Device: Sony PRS-T2, ADE on PC 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You might have several CSS stylesheets, and you might not want to use every one on every html file.  For instance, you might have a stylesheet named Main.css that you use for each file that is in the body of the book.  Then you might have an additional special one named Aux.css that you want to use only for a single html file that contains your Index.   Maybe you only have three html files that include images, so you might want another special stylesheet named Pics.css containing only stylings for your illustrations, so you could link that one only to those three html files.   Etc, etc, etc. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Each (x)html file can be linked to multiple stylesheets. Last edited by GrannyGrump; 03-15-2017 at 11:33 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520 
				Karma: 121692313 
				Join Date: Oct 2009 
				Location: Heemskerk, NL 
				
				
				Device: PRS-T1, Kobo Touch, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Perhaps it makes sense if I tell you that you can have multiple stylesheets. Sometimes it is easier to have stylesheets separate for certain HTML files. If they were automatically linked, it can cause strange effects. Some pages don't need a stylesheet at all.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Groupie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 171 
				Karma: 3517858 
				Join Date: May 2016 
				Location: Monterrey, Mexico 
				
				
				Device: Samsung Tab-3 7" 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 So my question is, is there a speed issue here? Could linking that unused stylesheet--or copying those specific styles into my main stylesheet--cause some slowdown in the overall epub? --Or the inverse, could copying that style into my main stylesheet and deleting the "extra" one speed up the the process? I've been curious about this because my I re-use the same stylesheet in every epub I do, and it has styles that are often not used in that specific book. And I don't go out of my way to delete the unused styles at the end of development. So am I setting a little "time"-bomb here? Last edited by JustinThought; 03-16-2017 at 04:00 AM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878 
				Karma: 2457540 
				Join Date: Nov 2011 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Have you ever experienced an eBook that you felt responded particularly slowly?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 A Hairy Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397 
				Karma: 20212733 
				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 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 As far as extra css files slowing it down: Yes. Any extra action that the app has to take will slow it down...be it from opening extra css sheets or wading through bloated inline styles/spans...but we're talking micro-seconds here for opening a css sheet. There would need to be a ton of css's linked to each html to make it noticeable. In this particular case having a few extra css sheets shouldn't slow it down noticeably because they are only referenced on the few pages that need them and would only be accessed by the app when those html files are opened. Having said all that, I find that having all my css on a single sheet makes it easier for me to keep myself organized. I would get confused if there were multiple sheets, and possibly different sheets using the same names. *shudder* I keep all of my standard css at the top of the sheet and then book specific styles at the bottom where they would override the standard style higher on the sheet. After I'm done editing, I use the "Delete Unused Stylesheet Classes" tool to...um... delete unused stylesheet classes and leave my CSS sheet as tidy as possible. note: when using this tool carefully check the list before deleting - it sometimes doesn't pick up on pseudo-elements being used properly.  | 
|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Epub styles question | nqk | ePub | 4 | 04-20-2015 06:26 AM | 
| How to turn off tooltips? | ktenney | Calibre | 8 | 01-23-2015 10:19 AM | 
| Disable tooltips? | jhalpin | Library Management | 7 | 06-08-2014 01:14 PM | 
| Question: paragraph spacing and CSS styles | rhino79 | ePub | 3 | 05-06-2013 06:06 PM |