View Single Post
Old 11-16-2014, 07:23 AM   #2
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 Psymon View Post
Yes, it's me, I'm back again with another problem.
...
I guess the issues I see with this are...

- How come the widths of my table columns are being ignored in ADE? They should be coming out more nicely spaced (as I'd specified in my code) as they do on the iPad, but it seems like ADE just completely ignores what I set them as.
Yes, code that works in iPad may not work in ADE. So, you have to use code that works in both ereaders. Regarding this issue, don't use

Code:
    <colgroup>
      <col span="1" style="width: 35%;" />
      <col span="1" style="width: 5%;" />
      <col span="1" style="width: 5%;" />
      <col span="1" style="width: 5%;" />
      <col span="1" style="width: 25%;" />
      <col span="1" style="width: 2%;" />
      <col span="1" style="width: 23%;" />
    </colgroup>
to indicate the columns' width. Below I attach an epub with changes I made; see the used code to watch how I managed the columns' width, but basically, I created five new styles:

Code:
.width_1 {
    width: 35%;
}

.width_2 {
    width: 5%;
}

.width_3 {
    width: 25%;
}

.width_4 {
    width: 2%;
}

.width_5 {
    width: 23%;
}
and I used them by adding them in the respective <td> tag; for example:

Before:
Code:
<td align="left" class="tdtext" valign="middle">Rice,</td>
After:
Code:
<td align="left" class="tdtext width_1" valign="middle">Rice,</td>
Quote:
- How come there's no hyphenation of the word "experiments" in the bottom-right hand column in that table?
Your problem here is due to the column width. Once you had solve this issue, the word "experiments" will be fine.

Quote:
- Although you don't see it in this ADE screenshot (in the two-page layout), in a one-page, wider layout the table defaults to aligning itself on the left of the page. Although this is a "bigger" table, I do have a whole bunch of other smaller table to deal with, too, and it would be nice if I could get them all to center (horizontally) in the page -- I just can't seem to figure out how to do so, though! It almost makes me long for ye olden days, when we had the simple <center></center> tag, because text-align:center doesn't cut it.
You have to set a width for the whole table, and then a margin-left to get what you want. For example your table will be centered if you give the table a width of 95% and a margin-left of 2.5%. But do that by enclosing the table in a div tag with the desired width. In this case I used a width of 80% (of the screen) and a left/rigth margins of 10% (because 80% + 10% + 10% = 100%). But you, use the values you like.

Below you can watch screenshots of my ADE 3.0 (with one and two columns layout):

Click image for larger version

Name:	Image1.png
Views:	277
Size:	97.8 KB
ID:	131178 Click image for larger version

Name:	Image2.png
Views:	293
Size:	131.3 KB
ID:	131175

I hope all this can help you

Regards
Rubén
Attached Files
File Type: epub walden-table.epub (451.6 KB, 182 views)

Last edited by RbnJrg; 11-16-2014 at 07:55 AM.
RbnJrg is offline   Reply With Quote