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

02-27-2011, 06:05 PM
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?


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.

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


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