View Single Post
Old 09-15-2014, 04:43 PM   #12
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Hi Tex,

thanks for that.
Quote:
Originally Posted by Tex2002ans View Post
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":

Attachment 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:

Attachment 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 { [...] }".
OK, so far so good, but what I see is different, and that is where my problem is...

My stylesheet looks like this (first image)

but then I have a second one called page_styles which contains only

Code:
@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }
I was expecting to see the code I entered in the "extra css pane" to pop up somewhere, but it hasn't...

Now, I did try to enter that code in both files, but it didn't like it and gave me an error instead.

Quote:
Originally Posted by Tex2002ans View Post
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...":

Attachment 128390 Attachment 128391

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

Attachment 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
Indeed, I need to brush up my very scant css skills, but I do need to get this bloody thing out of the door, and, incredible though it may sound, I did manage to solve most of my problems reading here and there and trying to make sense of it all
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2014-09-15 21.36.07.png
Views:	251
Size:	67.3 KB
ID:	128393  
Arkadian is offline   Reply With Quote