【发布时间】:2012-05-04 14:13:47
【问题描述】:
my previous question 的答案之一指出 colgroup/col 应该只在 IE 中工作。
我编写了一个适用于 IE9 的示例(见下文)(将单元格内容集中在第 3 列),但不适用于最新版本的 Chrome。
我做错了什么?
HTML 示例:
<html>
<head><title>test table centerring</title></head>
<body>
<table border="1">
<colgroup>
<col/>
<col/>
<col align="center">
</colgroup>
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Name 1</td>
<td>Value 1</td>
</tr>
<tr>
<td>2</td>
<td>Name 2, Name 2, Name 2, Name 2</td>
<td>Value 2</td>
</tr>
<tr>
<td>3</td>
<td>Name 3</td>
<td>Value 3</td>
</tr>
<tr>
<td>4</td>
<td>Name 4</td>
<td>Value 4, Value 4, Value 4, Value 4</td>
</tr>
</tbody>
</table>
</body></html>
【问题讨论】:
-
他们说它只能在 IE 中运行,这意味着它不能在 Chrome 中运行。
标签: html internet-explorer google-chrome cross-browser