View Single Post
Old 09-15-2014, 04:23 PM   #11
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
I must admit, I am much more familiar with Sigil, but here is a basic breakdown:

If you open up Calibre, you should right click on the book you want to fix, and select "Edit Book":

Click image for larger version

Name:	CSSStep1.png
Views:	403
Size:	50.0 KB
ID:	128388

This will open it up using Calibre's Editor (similar functionality to Sigil, if you have ever used that program to fix an EPUB).

Now that the book is open in Calibre's Editor, you should be able to look along the left-hand side under "Styles", and find a file that ends in .css:

Click image for larger version

Name:	CSSStep2.png
Views:	456
Size:	39.4 KB
ID:	128389

Click on that file, and it will open, you should then be able to insert the code that arspr gave above.

Note: There might already be code in the CSS file, you might want to look to see if any "body" code exists. As you can see in my sample image, there is already lots of stuff in the CSS file. If there already IS some body code, you might just want to add the hyphen stuff in between the squiggly brackets: "body { [...] }".

Now, you just have to make sure that your CSS file is "linked" to the HTML files, by right clicking on the HTML file, and selecting "Link stylesheets...":

Click image for larger version

Name:	CSSStep3.png
Views:	384
Size:	44.0 KB
ID:	128390 Click image for larger version

Name:	CSSStep4.png
Views:	392
Size:	4.1 KB
ID:	128391

Now, if you open the HTML file, you should see that some code is at the top, pointing to the Stylesheet.

Click image for larger version

Name:	CSSStep5.png
Views:	362
Size:	93.8 KB
ID:	128392

As was mentioned before though, it would probably be a good idea to brush up on at least some very basic HTML/CSS, so you aren't COMPLETELY lost. If you need any more help, feel free to ask.

There is also some info in the Calibre Manual:

http://manual.calibre-ebook.com/edit.html
Tex2002ans is offline   Reply With Quote