08-10-2015, 05:44 PM | #1 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Vertical Alignment in table cells, redux
My problem is similar to one discussed about three years ago, table-cell contents which are not vertically aligned at the top of their cells. The solution given was for CSS, however I am defining my table in old-fashioned HTML. I have "VALIGN="TOP" in the relevent TD statements, and in Calibre the display is correct if I view the "ZIP" (i.e. HTML) file, but when I convert to AZW3 or EPUB the cell contents are placed in the middle. What to do?
(Sorry for the dropped "x" in the subject line -- should be redux) Last edited by BetterRed; 08-10-2015 at 05:49 PM. Reason: fix title |
08-10-2015, 11:22 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add the following to extra css in the conversion dialog
td[valign=top] { vertical-align: top } |
08-11-2015, 05:30 PM | #3 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Thank you. I've never used CSS, as the little HTML I've written has all seemed to work without it. How does this indicate that it only should apply to the first column, not all columns, to match my original HTML?
Is there documentation as to what things that work in the Reader, when displaying HTML, will not make it into other formats when converted? And thank you to whomever "fixed" the subject line. Last edited by C Alberga; 08-11-2015 at 05:33 PM. |
08-11-2015, 10:27 PM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
08-14-2015, 10:47 AM | #5 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Again, thank you for the pointer. I wound up simply adding
style="vertical-align:top" to the relevant <TD> statements. That let me do a single find/replace for all documents on my files containing tables. Admittedly brute-force, but simplest. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML to Mobi conversion is adding border to all table cells | MikeBlyth | Conversion | 1 | 12-25-2012 09:54 PM |
iBooks: Avoid page breaks within table rows/cells | ckirchho | ePub | 7 | 06-12-2012 03:11 PM |
Help with vertical alignment, table cell content | meadowlarkOR | ePub | 1 | 01-01-2012 07:46 AM |
Vertical text alignment OCR | bookmeal | Workshop | 7 | 11-14-2011 03:28 PM |
Vertical Alignment | gardefjord | ePub | 2 | 05-25-2010 09:59 PM |