07-09-2018, 11:21 PM | #1 |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
table td and margins
I have some text in a table and I want each to outdent.
I do this all the time with,e.g. TOC: Code:
.toc { margin-left: 1em; text-indent:-1em;} Code:
td, p {font-size:.8em; vertical-align: top; text-align: left; margin-left: 1em; text-indent:-1em; } <table><tbody><tr> <td>Edward, Prince of Wales </td> <td>John de la Pole, Earl of Lincoln </td> <td>Edward, Earl of Warwick </td> <td>John of Gloucester </td> </tr></tbody> </table> the <td> shows al the formatting except margins. Even if I do td { margin: 4em;} there is zero effect So, margins just don't work in tables? Yet I see lots of example code here using margins in tr CSS. ================================================ Postscript: OK, so I tried putting pars inside each td.: Code:
td {font-size:.8em; vertical-align: top; text-align: left; } .out {margin-left: 1em; text-indent:-1em; } <td><p class="out"> Edward, Prince of Wales </p></td> Is there an authoritative reference to what CSS works in tables in epubs, and what does not? Coding by trial and error is exhausting. Last edited by AlanHK; 07-10-2018 at 11:17 AM. |
07-10-2018, 05:42 PM | #2 |
A Hairy Wizard
Posts: 3,094
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
|
Personally I dislike having <p>s inside of <td>s....it just grates my nerves...lol
Have you tried using the padding css instead of margin? td {padding-left:2em; text-indent:-1.5em} <tr><td>This would be a hanging indent, or an outdent</td></tr> |
07-10-2018, 10:14 PM | #3 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
I second Dion’s suggestion for padding. I have used this method frequently, and it works -In Sony TS2, ADE for PC, and Calibre reader (which is QTweb based, if I understand correctly).
|
07-19-2018, 05:56 PM | #4 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
07-20-2018, 04:12 PM | #5 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
07-27-2018, 11:38 AM | #6 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
So margins are meaningless; padding it is. Last edited by AlanHK; 07-27-2018 at 11:46 AM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents not being identified as Table of Contents | openletter | Conversion | 2 | 10-19-2012 12:54 AM |
Anyone know how to convert a pdf table into a table in Word or HTML? | BasilC | Workshop | 7 | 06-25-2010 01:02 AM |
Sideway Table in ePub (Rotate table/text) | Lapiz | ePub | 3 | 01-29-2010 01:11 PM |
Forget coffee table books-- how about a kitchen table book? | ardeegee | Lounge | 10 | 12-02-2009 12:00 PM |