View Single Post
Old 11-14-2010, 12:45 PM   #12
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
When Calibre converts a book to MOBI, it removes, as far as I can tell, the HTML height and width attributes from the IMG tag. If Calibre is converting image height and width attributes to ems, it must be replacing the HTML attributes with CSS properties, since the HTML attributes only accept, as far as I know, numerical values which indicate height and width in pixels.

For most height and width attributes - those which are deprecated in (X)HTML and therefore not acceptable in the "Strict" flavour - converting from HTML attributes to CSS properties is absolutely fine. The thing is... to the best of my knowledge, the HTML "height" and "width" attributes for the IMG tag aren't deprecated, and if that's the case, they shouldn't really be replaced with CSS formatting. They define the physical dimensions of the image, in pixels.

Yes, it's possible to use CSS to specify an image size in ems if you want the image to scale according to the font size, but I'd suggest that, in most cases, that's not what's wanted - you want the image to be displayed using its "native" dimensions.

- Donna

Last edited by DMSmillie; 11-14-2010 at 12:47 PM. Reason: Added omitted phrase "aren't deprecated"
DMSmillie is offline   Reply With Quote