我有以下脚本:把一个可滚动的div成表
<table width="100%">
<tr>
<td style="width: 300px;background-color: red">
</td>
<td style="background-color: lime">
<div style="width: 50%;overflow: auto;">
<img src="very_big_image.jpg" />
</div>
</td>
<td style="width: 400px;background-color: orange">
</td>
</tr>
</table>
它设置的第二td
等于我img
的width
宽度,(但在逻辑上第二td
必须具有宽度= '100% - 300px - 400px'
)所以我在整个窗口中都有滚动条。
我该如何解决?
不使用overflow:scroll;在这种情况下工作? – 2010-12-17 12:51:08
即使使用'overflow:hidden',它也不起作用:( – Simon 2010-12-17 13:01:23