| 
			
			 | 
		#1 | 
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				Device: Sony PRS-T2, ADE on PC 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Epub to Mobi7 conversion --- honoring CSS
			 
			
			
			I prefer using Calibre to convert epub to old mobi --- it is MUCH more trustworthy to honor my epub css than Kindlegen, which ignores a lot of things (text-indent: 0; top and bottom margins, and others). 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I do see one MINOR problem with the Calibre conversion. Horizontal Rules <hr /> never seem to go the full width of the screen even if I specify width: 100%. It is displaying at about 50 - 60% of the width. I can put up with it even if there is no workaround for this, but can anyone tell me a trick to make the <hr /> go full width? Thanks for any advice.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Not that I know of, does kindlegen create 100% wide <hr>s?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				Device: Sony PRS-T2, ADE on PC 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Well, not 100%. Maybe 90 - 95%. 
		
	
		
		
			See attached screen-shots for comparison. As you can also see, kindlegen ignores my text-indent: 0 and my top and bottom margins. That is why I prefer Calibre. But I do wish the hr was wider.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You sure you dont have any other stylesthat are impacting the hr? WHich kindlegen probably ignores.  
		
	
		
		
		
		
		
		
		
		
		
		
	
	Post a sample epub that shows the problem and I'll take a look  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				Device: Sony PRS-T2, ADE on PC 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Ok, here is the current epub I am working on. 
		
	
		
		
			The hr class is in main.css on line 264. There is another stylesheet, sgc-toc.css with a class for <hr>, but that stylesheet is only linked to the Table of Contents. Thank you for looking at this for me.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			One thing I find really bad form is multiple CSS. There's no reason for it.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			That should take care of it: https://github.com/kovidgoyal/calibr...c57ce60922e5d1 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Just FYI, you dont need to specify width 100% for <hr> by default it will take 100% of available width (it is a block element with width set to auto)  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 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 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 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 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() It is no like they can't restore a FULL house stylesheet, if the need additional styles for corrections ![]() Wait! Corrections?   We don't need no stinkn' corrections  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I've seen books where hundreds of classes were deleted from the CSS because the publisher used multiple CSS with way too any excess classes.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 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 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() The posters example of the sgc-toc only applies to the (inline) TOC and is not normally linked to the main work. The result is the main CSS is leaner  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			But, depending on the CSS used, you coud be duplicating CSS code. Like say you want to same body code.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | |
| 
			
			
			
			 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 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 it is a few dozen (duplicated) bytes or you would NOT be using a separate sheet. The days of 4K(words) or CORE are long gone. Saving a hundred bytes is rarely worth a blink.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				Device: Sony PRS-T2, ADE on PC 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 (re: width 100% -- I thought I would add that just in case it was a missing link to the problem)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| epub to azw3 conversion and Extra CSS | Section8 | Conversion | 8 | 02-07-2015 12:55 AM | 
| iPad not honoring CSS | uieluck | ePub | 5 | 03-14-2013 02:53 PM | 
| add css file to epub conversion | VICTORSJG | Calibre | 0 | 09-21-2011 08:38 AM | 
| Why, During ePub to ePub Conversion does Calibre changes existing CSS classes? | JSWolf | Conversion | 7 | 08-06-2011 08:32 PM | 
| EPub conversion stylesheet.css problem | nycaleksey | Calibre | 1 | 03-26-2010 12:42 AM |