| 
			
			 | 
		#1 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				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 12:17 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 A Hairy Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,397 
				Karma: 20212733 
				Join Date: Dec 2012 
				Location: Charleston, SC today 
				
				
				Device: iPhone 15/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>  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Obsessively Dedicated... 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,245 
				Karma: 35164265 
				Join Date: May 2011 
				Location: PA {back in the usa!} 
				
				
				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).
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Bookmaker & Cat Slave 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503 
				Karma: 158448243 
				Join Date: Apr 2010 
				Location: Phoenix, AZ 
				
				
				Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,877 
				Karma: 8821117 
				Join Date: Mar 2013 
				Location: Rosario - Santa Fe - Argentina 
				
				
				Device: Kindle 4 NT 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				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 12:46 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			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 01:54 AM | 
| Anyone know how to convert a pdf table into a table in Word or HTML? | BasilC | Workshop | 7 | 06-25-2010 02:02 AM | 
| Sideway Table in ePub (Rotate table/text) | Lapiz | ePub | 3 | 01-29-2010 02:11 PM | 
| Forget coffee table books-- how about a kitchen table book? | ardeegee | Lounge | 10 | 12-02-2009 01:00 PM |