我有一个css问题,我坚持..我无法得到我的可点击标题链接获得100%的高度; 不使用javascript.
我在谷歌上搜索了很多东西,但没有一个能解决我的问题.
我得到这个结果:
alt text http://thomasstock.net/css100percent.jpg
这是我的HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table>
<thead>
<tr>
<th>
<a href="#">header 1</a>
</th>
<th>
<a href="#">some very very very very very very very very very long header 2</a>
</th>
<th>
<a href="#">3</a>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
cell a1
</td>
<td>
cell a2
</td>
<td>
cell a3
</td>
</tr>
<tr>
<td>
cell b1
</td>
<td>
cell b2
</td>
<td>
cell b3
</td>
</tr>
</tbody>
</table>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
有了这个css:
table
{
width: 300px;
border-collapse: collapse;
}
th, td
{
border: solid 1px;
}
th a
{
background-color: Fuchsia;
/* Making the headerlinks 100% width */
width:100%;
float:left;
/* Making the headerlinks 100% height ??? */
height: 100%; /* doesnt work! */
min-height:100%;
}
tr
{
height:100%;
}
Run Code Online (Sandbox Code Playgroud)
=>如何使标题变为完全粉红色和可点击?(不使用javascript?)
| 归档时间: |
|
| 查看次数: |
13304 次 |
| 最近记录: |