Quote:
Originally Posted by Quexos
Thanks for this code 
but I still don't know whether this goes to the css file or maybe that other file with opf extension or elsewhere.
Besides is this standard code or code specific to one ebook. After all one cannot just take the css of one book and copy paste it to another's.
|
Why ever not? I copy and paste css all the time -- that's how I generated my standard css stylesheet in the first place and how I install it when I'm using Sigil. As for where the image code goes, it is in the first file/chapter of the epub. The preference is to have only that code in the file. The only change needed is to match the height/width numbers to those of image used for the cover.
Quote:
Originally Posted by Quexos
If book publishers and e-readers brands did their job we wouldn't have to bother messing with the code.
|
The nice thing with ebooks is that if I don't agree with how they did their job, I can change the formatting around to what I prefer.
Quote:
Originally Posted by Quexos
Code:
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 296 475" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="475" width="296" xlink:href="../Images/cover.jpeg"></image>
</svg>
</div>
|
In the code sample above, replace the 296 with the actual width of the image file and 475 with the height of the image file -- Sigil will show you those number when you open the image file.
If there is not a cover image already being displayed, use Sigil to split the first file at the <body> tag and paste the code into the new file.
You might want to check for various resources for learning about epub formatting around the web. One I like is the Pigs, Gourds and Wikis web site.
Regards,
David