controlling display size of images for mobi Fire
The book has a number of medium and small images; all should center in the horizontal dimension. The medium images are either tall or square, and will fit vertically by controlling the width of the image, to between 40 and 60% of the screen width. The small images need to be centered and display at about 10% of the screen width.
I can achieve this in epub documents converted from html using Calibre, and displayed on Adobe Digital Editions and in Sigil. In the css I specify margin-left: XX%, width:Y%. Where the left margin is (100-Y)/2 to create equal margins. But this control does not translate to the mobi document converted from epub to mobi by Kindlegen and viewed in the Kindle Previewer. The images as displayed in mobi are too large.
html code validates, epub code is good, kindlegen creates file without warnings. css has some parse errors on font-family, but this is because Kindle specs are to leave this undefined.
Perhaps the html underlying the mobi won't support this? Perhaps I am missing something obvious? Is there a better way to code this? Can this be achieved by coding in the html specifically for the target device, the Kindle Fire?