Firstly, thanks for everyone for replying.
I added the p definition and it now works! I think I read somewhere about inheritance of characteristics (sorry about the terminology but i guess you know what i mean) and assumed the body definition would work.
I now have a background colour margin at the bottom (very small one in ADE, much larger in Calibre) but I guess that is to preserve the aspect ratio as I now only specify height (for the cover) or width. Is that correct ?
What is the best way to deal with this ? I realise that depends on some extent to the reader/software being used, but is there a best practice to be aware of ? I have set the background to black which looks fine in ADE but didn't transfer when I used kindlegen, it just ended up as white instead. Although I am using kindle reader on a PC if that makes a difference ?
Quote:
You don't need padding. And it looks like really poor code as the styles should be in the CSS and not in the XML.
|
It is really poor code but it's my first effort! Have cleaned it up now as below:
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>
<link rel="stylesheet" type="text/css" href="../Styles/Style0001.css"/>
<title></title>
</head>
<body>
<p><img alt="" src="../Images/myimage.jpg" width="100%" /></p>
</body>
</html>
and..
Code:
html { border: 0; margin:0; }
body { border: 0; margin:0; background-color:rgb(0,0,0);}
@page { border: 0; margin:0; }
p { text-align: center; margin: 0; padding: 0; text-indent: 0 }
Does this look OK ? Thanks for the help so far and for bearing with me...!