View Single Post
Old 05-19-2013, 02:39 PM   #472
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Quexos View Post
Ok this is probably a little over my league. I opened the first .html file within the epub.zip then I opened that html file by adding .txt so that I can see what's inside and modify if necessary and the closest thing to what you mention which is @page goes like this:
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
If that's what defines the position of the cover, maybe I could add margin-left and margin-right values ?

Also to make it all even more confusing, I forgot to mention that on my computer the e-book cover looks normal, it's only in my Kobo reader that it's stretched.


Well because a specific css sheet is for a specific book isn't it ?
if it was all standard then all css sheets would be exactly the same.
But when you look at them they are widely different, some for instance apply text rules with the name "p", others with the name "body" etc ... When through caliber it all becomes "caliber1" "caliber 2" etc ... which is even more confusing when you try to locate a value that for instance would rule indents.
In the meantime, do I just randomly cram the new code here provided and where exactly ? Just before "@page" ? Or at the very beginning (cause there is still some weird code before that)
I'd suggest using Sigil to edit epub files. As for the differences between style sheets, you can add elements in many ways.

p would apply to all paragraphs, p.para would apply to p tags with class=para, d.poem would apply to div tags with class=poem, etc.

If you don't have a background in web page creation, the learning curve takes a while but it is worthwhile.

There are quite a few web sites that will help you to learn. W3Schools, Pigs, Gourds and Wikis (some of her publications would be quite helpful), etc.

As for the difference in images on your computer and on your Kobo, what program are you using to view them on your computer?

A sample of the entire first file from an epub follows. The image is stored as cover.jpg in the Images folder and it is 510x680 pixels. Sigil will generate various folders when you open and then save an epub if they don't already exist.

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Text Redacted</title>
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body class="nomargin">
  <div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 510 680" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="680" width="510" xlink:href="../Images/cover.jpg"></image>
    </svg>
  </div>
</body>
</html>
Regards,
David
DNSB is offline   Reply With Quote