View Single Post
Old 01-21-2010, 10:57 AM   #1
omk3
Wizard
omk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five wordsomk3 can name that ebook in five words
 
omk3's Avatar
 
Posts: 1,454
Karma: 37243
Join Date: Dec 2009
Location: Europe
Device: pocketbook 360, kindle 4
My first epub: Cover is on page 2 (?)

I have now more or less completed my first-ever hand-crafted epub. I tried to do it properly, with clean code and manually editing everything that was needed. I used Jellby's "The Prince and the Pauper" as a guide for the parts I found most confusing (thanks Jellby!), and in the end I got it in a format I am happy with, with embedded fonts for titles, with margins and different indents for the first paragraph of a chapter and so on. Pretty simple stuff for all your experienced folks, but it was my first time with xhtml and css and I'm quite happy with my progress. I got my epub validated and it works and looks fine.

Except for the cover. The strange thing about the cover is, it is on page 2-3(!). I try to navigate to page 1, but it seems there is no such thing.

I shamelessly copied the script for the cover page, and I don't really understand it. It is like this:
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<!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> cover </title>
</head>

<body>

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 600 800" preserveAspectRatio="xMidYMid meet">
<image width="600" height="800" xlink:href="images/cover.jpg" />
</svg>

</body>
</html>
As I understand it it's supposed to resize the image according to screen size, keeping aspect ratio. I removed the link to the style sheet from the cover page as it was not needed and added margins which I didn't want.
The cover appears with a small margin everywhere but on the bottom side, and as I said before, is on page 2-3 instead of page 1.

As everything works and looks okay it's not really a problem, it's just weird. Am I making a really obvious mistake that I can't see?

The image I used for the cover is 600x800 and has no white margins of its own.

Thanks for any comments!
omk3 is offline   Reply With Quote