table的宽度在变?

zhangshuo7 2005-01-25 03:48:09
<table border=1>
<tr>
<table border=1>
<th nowrap height=20 width=180>aaa</th>
<td nowrap height=20 width=24>111<br></td>
</table>
</tr>

<tr>
<table border=1>
<th nowrap height=20 width=180>bbb</th>
<td nowrap height=20 width=266>333<br></td>
</table>
</tr>
</table>
上边代码,aaa和bbb都是180,但是,把IE缩小後(下面出滚动条),他们不一样长了,???晕!Netscapt没有问题,为什么呀?怎么办?在IE里,table的width会变吗?
...全文
114 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangshuo7 2005-01-26
  • 打赏
  • 举报
回复
嗯,,这个回答。。。满意。。。是不是bug我就不知道了,但是如此变更以后达到要求了。呵呵。现在的现象该死!其实不用这么做的。没办法了。。。非常感谢南方的养!
chonboy 2005-01-26
  • 打赏
  • 举报
回复
找到原因了
由于表格宽度没有指定宽度,在调整IE窗口大小时,IE会重新计算表格显示尺寸,也许是计算有误差或者BUG吧
如果你指定了表格Table总宽度,将不会出现你说的问题,下面的代码拷过去试试

<table border=1 width="210">
<tr>
<th nowrap height=20 width=180>aaa</th>
<td nowrap height=20 width=30>111<br></td>
</tr>
</table>
<table border=1 width="480">
<tr>
<th nowrap height=20 width=180>bbb</th>
<td nowrap height=20 width=300>333<br></td>
</tr>
</table>
zhangshuo7 2005-01-26
  • 打赏
  • 举报
回复
自由人,你好,,,大的后面的现实不了会出滚动条呀,而且我以为width=180,应该是绝对的呀。你可以给我出滚动条,但是,不应该给我缩小呀。80%一定会缩小,但是效果就不一样了。而且,现在我做的是个移植,不好意思给人家原来的东西改太多。
moodboy1982 2005-01-26
  • 打赏
  • 举报
回复
你把宽设为一个具体的值,当浏览器缩小时,它肯定会变的。一个大后面那个就显示不了。会缩小。
一个办法,就早把你那个width=??设为百分比。如:width=80%,这样,不管你怎么缩小,他们的比例都不会变。
李尸尸 2005-01-26
  • 打赏
  • 举报
回复
呵呵,我是来接分地!
zhangshuo7 2005-01-26
  • 打赏
  • 举报
回复
有大虾吗?谁帮我看看?给我介绍点知识。谢谢了!
zhangshuo7 2005-01-25
  • 打赏
  • 举报
回复
完了?没有了?ie,混蛋。bug?你们有没有同样的处境?
zhangshuo7 2005-01-25
  • 打赏
  • 举报
回复
奥,谢谢你。。。不过,我就是想让看看那个266的缩小了,24的没有。如果都是266,那都是缩小的,就不明显了。是不是IE会缩小?,netscapt不缩小?都是180,为什么会缩小呀?
我是杨威利 2005-01-25
  • 打赏
  • 举报
回复
改成都是24也行啊,帮你试过了,就是IE缩小它们也是一样长的。
<table border=1>
<tr>
<table border=1>
<th nowrap height=20 width=180>aaa</th>
<td nowrap height=20 width=24>111<br></td>
</table>
</tr>

<tr>
<table border=1>
<th nowrap height=20 width=180>bbb</th>
<td nowrap height=20 width=24>333<br></td>
</table>
</tr>
</table>
TSD 2005-01-25
  • 打赏
  • 举报
回复
<table border=1>
<tr>
<table border=1>
<th nowrap height=20 width=180>aaa</th>
<td nowrap height=20 width=266>111<br></td>
</table>
</tr>

<tr>
<table border=1>
<th nowrap height=20 width=180>bbb</th>
<td nowrap height=20 width=266>333<br></td>
</table>
</tr>
</table>
TSD 2005-01-25
  • 打赏
  • 举报
回复
小子,24=266?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧