【发布时间】:2016-03-18 22:47:14
【问题描述】:
我正在使用 kindle 格式的 KF8 进行我的第一步。 Publishing Guidelines 表示该格式支持 CSS3:
早期的 Kindle 平台为 Cascading 提供了非常基本的支持 样式表 (CSS)。这在 KF8 中得到了显着增强 支持 CSS 2/CSS 3。
现在这似乎是“非常基本的”:我想右对齐表格单元格中的文本。比较 Chrome 与 kindlegen 2.9 / Kindle Previewer 2.94 的输出。 Kindle Preview 完全忽略对齐方式。
我做错了什么?
<!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>
【问题讨论】: