View Single Post
Old 04-16-2019, 04:21 PM   #16
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,823
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DanaRu View Post
Tell me, please, what should I do for the photo?
Well, you need to do several things if you plan to include a picture in a cell of a table:

1) First, you need to set the width of the cell according with the width of the image. For example, if you plan that the width of the image will be the 50% of the screen, then you'll need to set the width of the cell as 50% of the screen too.

2) After that, you'll have to give the image a width of 100% (so the image will full the width of the cell; and as the cell it has a width of 50% of the screen, then the width of the image will be also 50% of the screen).

3) To include your image in the cell you mustn't use the following code (in your .xhtml file):

Code:
<td class="My_Width">
       <img class="My_Img" alt="" src="../Images/your_image.jpg" />
</td>
and in the .css stylesheet:

Code:
.My_Width {
     width: 50%;
}

.My_Img {
     width: 100%;
}
The above code is correct, but it has issues under iPhone/iPad. So, as workaround, you have to use the following code:

Code:
<td class="My_Width">
    <div class="My_Img">
           <img alt="" src="../Images/your_image.jpg" />
    </div>
</td>
That code will work (or it should ).

And regarding your issue with the table whose screenshot you attached in your last post, can you post here the code for that table? (the .html code and the .css you used).

Regards
Rubén

EDIT: Hmmm, after studying a bit your table, I saw it has long numbers. That's a problem. You'll have to reduce the width of the first, fourth and last columns and maybe reduce a bit the cells padding. But post the code of your table and I'll be able to give you a more accurate opinion.

By the way, I saw that you are building an ebook of cientific nature; do you have in it many mathematical formulas? If so, you could consider to write your epub as epub3 and to employ MathML (the alternative is to write the epub as epub2 and to employ images -.png or preferably .svg- for the formulas).

Last edited by RbnJrg; 04-16-2019 at 04:43 PM.
RbnJrg is offline   Reply With Quote