![]() |
how to use device independent (dp) in HTML to MOBI
I need help making images look the same across devices.
I am developing an ebook to publish on Fire HD, HDX, HDX 8.9 and the new HD 10. I create the content in HTML format, which includes includes images that are tagged in px units. I assemble the ePub using Sigil. I view the ebook using Amazon Fire HD Previewer, that lets me see the book in HD (which I assume means HD7), HDX (which I assume is HDX8), and HDX 8.9. The previewer cannot not simulate HD 10 yet. The images look big in HD, fine in HDX, and tiny in HDX 8.9. I changed the HTML to tag the figures in dp units instead of px but nothing changed. I read that dp units means the dp=px at 160 dpi device but the image should scale for devices with higher dpi. It does not happen in the Previewer. What am I doing wrong? |
Quote:
|
I use images 800 pixels wide and include a width="100%" instruction in the html.
|
Set the "width" of your images in "%" (of the screen) in your .css stylesheet and set the height to "auto".
|
% works sometimes, sometimes not
Quote:
Code:
<tr id="a0000000013">http://barbero.cadec-online.com/pape...e/img-0004.png is 10px wide, 18px tall. I calculated the % as %=100*px/WR, where WR is the device resolution along the with. I try this in my 1920x1080 monitor (landscape) and a fire HD (800 px.) It works when I put the % value inline, but it does not work at all when I put the same value (0.52%) in place of the 10px for the same figure inside the table cell. ??? img-0004.png http://barbero.cadec-online.com/pape...e/img-0005.png http://barbero.cadec-online.com/pape...e/img-0005.png Thanks! |
2 Attachment(s)
Well, now I understand better what you want. Since I don't have your classes "mat gen" and "eqnnum" your results could be different from mine but try this code:
Code:
<body>Regards EDIT: By the way, you don't need to employ an inline image for the delta symbol. Instead you could use: Code:
<p>where <span style="font-family: Symbol; font-size: 1.2em">d</span> is the ineffective length.</p> |
Quote:
|
| All times are GMT -4. The time now is 11:01 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.