View Single Post
Old 06-07-2014, 05:32 PM   #20
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by weberr View Post
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.

Spoiler:
<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;
}
Doesn't the 12px font sort of demolish the entire, "user-chooses-the-font-size" element? I mean, I know it would for Nook...? Maybe I'm just looking at this too quickly, or misremembering the original post, but wasn't the point that you wanted to be able to change devices, fontsizes, etc., and have everything magically resize?

Also, n.b.: any table with more than 4 columns starts to be seriously problematic in ANY reader; but that's not directly related to your issue. I thought I'd mention it to you, however.

Hitch
Hitch is offline   Reply With Quote