看看这个页面: http://labs.pieterdedecker.be/hetoog/layout.htm
它在Firefox中看起来不错,但IE搞砸了。怎么样?
答案 0 :(得分:3)
您的布局有点有趣。不要在页面的任何一侧使用空的表格单元格,而是可以使用
来取出它们并实现居中body {
width: 750px;
margin: 0 auto;
}
你的HTML可能是这样的:
<body>
<table>
<tr>
<td class="splash_desc">...</td>
<td class="splash_photo">...</td>
</tr>
...
使用这种方法,IE不会占用比其他浏览器更多的空间,并且可以很好地适应750px宽的容器。
修改强>
要使标题栏水平拉伸100%,您必须为内容创建另一个div。因此,不要使用body元素来设置宽度,而是使用以下内容:
<body>
<table id="header"><tr>...</tr></table>
<div id="wrapper">
<table>
<tr>
<td class="splash_desc">...</td>
<td class="splash_photo">...</td>
</tr>
...
在CSS中:
#wrapper {
width: 750px;
margin: 0 auto;
}
这样你可以让上面的表格包装为100%宽(只是样式),包装本身宽750px。
答案 1 :(得分:0)
问题是
在IE6.0中<td> </td>
不支持。
指定<td width="20%"> </td>
和PNG图像。
从http://www.twinhelix.com/css/iepngfix/下载
文件:iepngfix.zip(40kb)将解决问题