Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2018, 11:21 PM   #1
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 389
Karma: 1002
Join Date: Apr 2014
Device: PW-3, 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;}
But when I try it with td, the indent is shown, but margins have no effect.

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>
- text in <p> tags does express the margins.
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>
Now each cell does wrap as intended.

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.
AlanHK is offline   Reply With Quote
Old 07-10-2018, 05:42 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,628
Karma: 11714834
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
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>
Turtle91 is offline   Reply With Quote
Old 07-10-2018, 10:14 PM   #3
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 1,822
Karma: 16993687
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).
GrannyGrump is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 12:15 AM.


MobileRead.com is a privately owned, operated and funded community.