【发布时间】:2012-07-04 00:41:34
【问题描述】:
在表格标题中,th 标签的默认文本对齐方式是居中。
考虑以下代码:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
background-color: aliceblue;
}
.default_grid {
text-align: left;
width: 600px;
color: white;
}
.default_grid th {
/* text-align: left; */
}
.default_grid .first {
background-color: purple;
}
.default_grid .second {
background-color: orange;
}
</style>
</head>
<body>
<table class="default_grid">
<thead>
<tr>
<th class="first">Test One</th>
<th class="second">Test Two</th>
</tr>
</thead>
</table>
</body>
</html>
在 Firefox、Internet Explorer 7(及更低版本)、Safari、Chrome 和 Opera 中,
哪一个是正确的行为?
【问题讨论】:
标签: css html html-table