我的表格列宽怎么不能控制?

binb 2006-03-22 10:29:44
<table width="768" height="273" border="1" cellspacing="0" cellpadding="0" >
<tr><td><table style="TABLE-LAYOUT: fixed" width="100%" height="273" border="1" cellspacing="0" cellpadding="0" >
<tr height="20" align="center" valign="top">
<td class=ColorBorder3 width="20%" >优秀等次年度</td>
<td class=ColorBorder2 width="20%" >基本称职年度</td>
<td class=ColorBorder2 width="20%" >不称职年度</td>
<td class=ColorBorder2 width="20%" >不定等次年度</td>
<td class=ColorBorder2 width="20%" >不考核年度</td>
</tr>
<tr align="center" valign="top">
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="20%" align="left" ><%=yx_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="20%" align="left" ><%=cz_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="20%" align="left" ><%=bcz_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="20%" align="left" ><%=bddc_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="20%" align="left" ><%=bkh_zj%></td>
</tr>
</table></td></tr></table>

如上表格,我在其中的一格写内容,怎么列宽不断加宽,有什么办法
...全文
178 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
binb 2006-03-22
  • 打赏
  • 举报
回复
还是不能控制!?
md5e 2006-03-22
  • 打赏
  • 举报
回复
所有列宽的总合要等于表的宽度
binb 2006-03-22
  • 打赏
  • 举报
回复
width="20%" 改成 width="100px" or style="width:100px"
还是一样的,不能控制列宽?
lymyx 2006-03-22
  • 打赏
  • 举报
回复
里面有 百分比的全部改成 像素值就可以了。
百分比不大好控制。
mingxuan3000 2006-03-22
  • 打赏
  • 举报
回复
width="20%" 改成 width="100px" or style="width:100px"
uddtxgt 2006-03-22
  • 打赏
  • 举报
回复
你应该不会只写数值和字母吧~
如果有汉字表格会自动换行的~不必担心~
chenyu112 2006-03-22
  • 打赏
  • 举报
回复
将第一行的<table width="750px" height="273" border="1" cellspacing="0" cellpadding="0" > 改为<table width="750px" height="273" border="1" cellspacing="0" cellpadding="0" style="word-wrap: break-word; ">

binb 2006-03-22
  • 打赏
  • 举报
回复
<table width="750px" height="273" border="1" cellspacing="0" cellpadding="0" >
<tr><td width="750px"><table style="TABLE-LAYOUT: fixed" width="750px" height="273" border="1" cellspacing="0" cellpadding="0" >
<tr height="20" align="center" valign="top">
<td style="TABLE-LAYOUT: fixed" class=ColorBorder3 width="150px" >优秀等次年度</td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder2 width="150px" >基本称职年度</td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder2 width="150px" >不称职年度</td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder2 width="150px" >不定等次年度</td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder2 width="150px" >不考核年度</td>
</tr>
<tr align="center" valign="top">
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="150px" align="left" ><%=yx_zj%>6666778888888888888888888</td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="150px" align="left" ><%=cz_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="150px" align="left" ><%=bcz_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="150px" align="left" ><%=bddc_zj%></td>
<td style="TABLE-LAYOUT: fixed" class=ColorBorder6 width="150px" align="left" ><%=bkh_zj%></td>
</tr>
</table></td></tr></table>

现在还是一样的,随着文字的增多,列宽不断增加.
uddtxgt 2006-03-22
  • 打赏
  • 举报
回复
只要你把表的宽度写死就不会出现你说的情况了~
binb 2006-03-22
  • 打赏
  • 举报
回复
help me

28,391

社区成员

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

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