View Single Post
Old 06-09-2014, 04:34 AM   #25
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: 3,231
Karma: 35158061
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
@Weberr -- I don't know if this is what you are looking for for text alignment, but this works for me. I set the alignment in the individual cells. (I have never worried about hyphenation and let the app/device worry about it instead.) I don't set a fixed font size, and only use relative font-sizing, ie, 80% or .8em.

Of course, I only work with fiction, so my needs are very simple. This is what I used recently, with an embedded monospace font (it is a bit more attractive than the default reader font).

Sample css code
Spoiler:
Code:
.ttable {
display: table;
width: 90%;
margin-left: 5%;
margin-right: 5%;
border:0;
border-collapse: separate;
border-spacing: 2px;
text-indent: 0;
}
.ttbody {
display: table-row-group;
vertical-align: bottom;
}
.trows {
display: table-row;
vertical-align: inherit;
}
.tcelLeft, .tcelMid, 
.tcelRite, .tcelTop  {
display: table-cell;
padding: .35em 1px 1px 1px;
vertical-align: bottom;
text-align: left;
}
.tcelLeft { text-align: left; }
.tcelMid  { text-align: center;}
.tcelRite { text-align: right;}
.tcelTop  { vertical-align: top;}

.tcelSign {
display: table-cell;
padding: .35em 2px 2px 2px;
text-align: center;
vertical-align: top;
border: solid 1pt;
border-color: black;
}
.tcelSpacer {
display: table-cell;
padding: 0 1px;
text-align: center;
vertical-align: middle;
font-size: 60%;
}
.mono { 
font-family: "Linux Libertine Mono", serif;
font-size: 90%;
}

sample HTML
Spoiler:
Code:
<div class="mono">
<p class="acentr"><em>The United States of America<br />
 in account with<br />
 the Hon. Clerk of the Senate Committee on Conchology,&nbsp; Dr.</em></p>

<table class="ttable">
<tbody class="ttbody">
<tr class="trows">
<td class="tcelLeft">
<div class="hang">
To consultation with Secretary of War,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$50</td>
</tr>

<tr class="trows">
<td class="tcelLeft">
<div class="hang">
To consultation with Secretary of Navy,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$50</td>
</tr>

<tr class="trows">
<td class="tcelLeft">
<div class="hang">
To consultation with Secretary of the Treasury,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$50</td>
</tr>

<tr class="trows">
<td class="tcelLeft">
<div class="hang">
Cabinet consultation,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">No charge</td>
</tr>

<tr class="trows">
<td class="tcelLeft">
<div class="hang">
To mileage to and from Jerusalem, via Egypt, Algiers, Gibraltar, and Cadiz, 14,000 miles, at 20c. a mile,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$2800</td>
</tr>

<tr class="trows">
<td class="tcelLeft">
<div class="hang">
To salary as Clerk of Senate Committee on Conchology, six days, at $6 per day,
</div>
</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$36</td>
</tr>

<tr class="trows">
<td class="tcelSpacer">&nbsp;</td>
<td class="tcelSpacer">&nbsp;</td>
<td class="tcelSpacer" style="border-bottom:1pt solid">&nbsp;</td>
</tr>

<tr class="trows">
<td class="tcelRite">Total,&nbsp;&nbsp;</td>
<td class="tcelMid">&nbsp;</td>
<td class="tcelRite">$2986</td>
</tr>
</tbody>
</table>
</div>


This is a very simple three-column table with no borders. The middle column is just to provide more spacing between the text and the numbers.
Attached Thumbnails
Click image for larger version

Name:	SimpleTableNoBorders.png
Views:	326
Size:	53.4 KB
ID:	123844  

Last edited by GrannyGrump; 06-09-2014 at 04:42 AM.
GrannyGrump is offline   Reply With Quote