请帮帮我
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="margin: 0px; padding: 0px;">
<table style="width: 600px;">
<tr>
<td rowspan="2" style="background: #FF0;">Left<br/><br/><br/><br/><br/><br/><br/><br/><br/> </td>
<td colspan="2" height="30px" style="background: #FCC;height: 30px;">header</td>
</tr>
<tr>
<td>Content</td>
<td style="background: #EEE;">Right</td>
</tr>
</table>
</body>
</html>
它在 Firefox 或 chrome 中工作正常,但 IE 忽略高度属性并且带有文本标题的单元格高度不正确。如何解决?
演示:Fiddle
最佳答案
使用 td 中的元素设置高度,如下所示:
<div style="display:block;height:30px;">header</div>
关于css - td 和高度在 IE 中不能正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14706522/