Robię moje pierwsze kroki z kindle format KF8. Publishing Guidelines stan że format obsługuje CSS3:Jak wyrównać dane tabeli dla Kindle (KF8)
Im wcześniej platforma Kindle oferowany bardzo podstawowe wsparcie dla Kaskadowe Style Sheets (CSS). Ta została znacznie zwiększona w KF8 z wsparcie dla CSS 2/CSS 3.
Teraz to wydaje się być „bardzo podstawowe” tutaj: Chcę prawo wyrównać tekst w komórce tabeli. Porównaj dane wyjściowe Chrome z kindlegen 2.9/Kindle Previewer 2.94. Podgląd Kindle ignoruje całkowicie wyrównanie.
Co robię źle?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Table sample</title>
<meta charset="utf-8" />
<style>
td.right {
padding: 2px 4px;
text-align : right;
}
td.left {
padding: 2px 4px;
text-align : left;
}
td.center {
padding: 2px 4px;
text-align : center;
}
h2 { color: green; }
</style>
</head>
<body>
<a name="part2_chap1"/>
<article role="main">
<header class="chapter">
<hgroup>
<h2>ALIGNMENT</h2>
</hgroup>
</header>
<div class="epigraph">
<p class="noind">How to right align table data</p>
</div>
<section class="table" id="table01">
<table>
<tr>
<th>
<i>---center---</i>
</th>
<th>
<i>---right---</i>
</th>
<th>
<i>---right---</i>
</th>
<th>
<i>---left---</i>
</th>
</tr>
<tr>
<td class="center">---centered---</td>
<td class="right">right></td>
<td class="right">right></td>
<td class="left"><left</td>
</tr>
<tr>
<td class="center">centered</td>
<td class="right">right></td>
<td class="right">right></td>
<td class="left"><left</td>
</tr>
</table>
</section>
</article>
</body>
</html>
Dziękuję, to działa. To nie działa, gdy w komórce jest coś w rodzaju indeksu górnego, ale cieszę się, że mam przynajmniej podstawową opcję układu. Twierdzenie o obsłudze CSS jest żartem, nie wspominając już o CSS3. – ratlan