View Single Post
Old 06-07-2014, 03:46 PM   #19
weberr
New old guy
weberr began at the beginning.
 
Posts: 69
Karma: 10
Join Date: Feb 2012
Device: kindle fire
Thank you all for your ideas, suggestions, tips. This turned out to be an extensive exercise with hours of trial-and-error.

But, I have finally created a skeleton CSS/HTML that works for me -- works regardless of eReader/User's choice of font/page width, and editor's choice of number of columns and choice of column width -- and lets me use a caption or not, assign number of columns and assign column widths directly from the html text without any changes to the css.

Just two remaining "needs". I have not found a way to have different text alignments for any column (i.e., left or center for column 1 and justify for column 2) and I have not been able to implement auto hyphenation for text columns.

<table class="table1" width="80%">
<caption></caption>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<tr>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"></td>
</tr>
</table>


.table1 {
margin:auto;
border:1px solid black;
font-size:12px;
border-collapse:collapse;
}
.table1 caption {
font-size:140%;
font-weight:bold;
font-style:Italic;
}
.table1 th {
border:1px solid #000;
background-color:grey;
color:white;
font-weight:bold;
border:1px solid black;
padding:10px;
}
.table1 td {
vertical-align:top;
text-align:justify;
border:1px solid black;
padding:10px;
}
weberr is offline   Reply With Quote