View Full Version : jpg as a cover, how to adjust it as a 1st page?


shlomof
02-27-2011, 06:05 PM
Hello,
I had aproblem that when converting one of word doc tempalates to HTML, it would save that format. so I did a workaround and changed the whole 1st page into a sinlge jpg and added it as a cover.

so far so good.

now, when converting it into an epub in calibre I see that the jpg is only on half of the 1st page. how can I make it to automatically adjust itself as a whole page to whatever screen size the user is using?

thanks,
Shlomo

Adjust
02-27-2011, 06:14 PM
you can adjust the cover in your CSS file image Height = 100%

If you are not sure about how to go about doing that try this Program for editing ePubs.

http://www.mobileread.com/forums/showthread.php?t=52493

shlomof
02-27-2011, 06:20 PM
Thanks!!!
can you please tell me what exctly is the code to add and where as I"m not a css person...

thanks,
Shlomo

Adjust
02-27-2011, 06:30 PM
Add this to your template.CSS file. (you can edit it in either a text editor like textwrangler or in dreamweaver, something which saves as UTF-8)

.image {
margin-top: 1em;
margin-bottom: 1em;
margin-left: 1.2em;
text-align: center;
max-height: 100%
}


Then open your Cover.XHTML (or whatever it's called and change the code to match mine

<?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>
<link href="template.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="cover">
<div class="image">
<img src="images/Cover.jpg" alt="Cover.jpg" height="100%" />
</div>
</div>
</body>
</html>