View Single Post
Old 03-16-2012, 03:35 PM   #10
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by jezzad View Post
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 ?
If the aspect-ratio does not exactly match the ratio of the "usable" space (screen-size minus status-bars etc.) of the device, there will be a small border. And when the device rotates the contents from portrait to landscape mode (which is, as i recall, a feature of kindel), then there will be a big border ...
IMO. the best is to use height="100%" for portrait-oriented pictures and width="100%" for landscape-pictures. You should play with it and get some experience. And note that some devices will add some border "just for fun".

Quote:
kindlegen, it just ended up as white instead. Although I am using kindle reader on a PC if that makes a difference ?
I've no experience with kindlegen but you may try "background-color: #000000" or "background-color: black" instead of "rgb(0,0,0)".

Quote:
It is really poor code but it's my first effort!
This was not a poor code, it was an excellent code, reduced to the minimum neccessary to show you, how the things could go.

Of course there are better ways to place formattings, but the question was "how to embed pictures" and not "how to make stylish css". Sorry for this extension which is actually adressed to someone else.
mmat1 is offline   Reply With Quote