09-22-2017, 10:58 AM | #1 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
[Tables] Different number of rows per column
Don't jump too easy on conclusions: I searched a lot and all answers were somehow like "use rospan/colspan" with the obvious tables of menus or calender...
What I need is that a table has 4 equal cells in the first column and 3 equal ones in the second column (of course, both columns having the same height). I tried Code:
<tr> <td rowspan="3">Cell 1:1</td> <td rowspan="4">Cell 1:2</td> </tr> <tr/> <tr> <td rowspan="3">Cell 2:1</td> </tr> <tr/> <tr> <td rowspan="3">Cell 3:1</td> </tr> <tr> <td rowspan="4">Cell 2:2</td> </tr> <tr/> <tr> <td rowspan="4">Cell 4:1</td> </tr> <tr/> <tr> <td rowspan="3">Cell 3:2</td> </tr> <tr/> Any ideas of improving it? Last edited by Ghitulescu; 09-22-2017 at 11:05 AM. Reason: wrong copy/paste |
09-22-2017, 11:55 AM | #2 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
My understanding is that you want a table with two columns. The first column has four rows of equal height and the second column has three rows of equal height, each 4/3 of the height of the rows in the first column. I am also assuming that you want the table to use the minimum height based on the largest cell in either column and that this height could vary with content and font size.
I don't think that this is possible in html without using javascript, but I look forward to others with more html experience proving me wrong. |
09-22-2017, 12:04 PM | #3 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
That's right... I was also afraid of such a negative outcome...
I also tried this in Word, then import in calibre for conversion - it won't work without some fixed sizes |
09-22-2017, 12:08 PM | #4 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
If there is no horizontal connection between the boxes then a table isn't what you want. You want 2 columns with a table in each column.
|
09-22-2017, 12:21 PM | #5 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
There must be a connection - item 1:1 should correspond to item 1:2, item 2:1 should correspond to both items 1:2 and 2:2, item 3:1 must also correspond to items 2:2 and 3:2, whereas item 4:1, like 1:1 should only correspond to item 3:2.
My simple, engineer idea, was to have a 12 rows 2 columns table, join 3 cells in the first column and 4 in the second. I had to insert from place to place "empty" rows (<tr/>) in order to give a proper counting. |
09-22-2017, 12:28 PM | #6 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
|
09-22-2017, 02:01 PM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
09-22-2017, 02:01 PM | #8 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Build the table in some other app...take a screenshot...insert into ebook as an image.
|
09-23-2017, 06:03 AM | #9 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
What's the actual data? Maybe it can be represented in a much more user-friendly/meaningful way.
|
09-25-2017, 03:06 AM | #10 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
Data is text.
But anyway, I tested my solution on several hardware and software eReaders and the results are somehow satisfactory, albeit not perfect. |
09-27-2017, 08:00 AM | #11 |
Fanatic
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
|
This is how I've done, just that, as explained in the beginning, the alignment is not perfect.
|
09-27-2017, 09:00 AM | #12 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
I'd second the recommendation to insert it as an image.
|
09-28-2017, 12:03 PM | #13 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Try the following.. build the table in Word and save as DOCX, Then convert via Calibre to ePub and have a look at the code. You might be able to take the code and copy it into your eBook.
|
09-28-2017, 11:17 PM | #14 | |
null operator (he/him)
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Maybe no need to bother buiiding a sample, have a look at the table with merged cells in Kovid's Demo DOCX BR |
|
09-29-2017, 11:06 AM | #15 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Column propagation to other rows? | jindroush | Library Management | 4 | 11-17-2014 06:33 PM |
oeb-column-number | MikeMJ | Editor | 4 | 09-06-2014 08:05 AM |
AN ID NUMBER COLUMN? | Greg Waddell | Library Management | 3 | 10-21-2013 10:00 PM |
Column Width changes in Tables in Word Processor Documents | Bob-El | Conversion | 0 | 02-18-2012 12:14 PM |
User Column with number of formats | lbik | Library Management | 6 | 06-18-2011 07:55 AM |