日期:2014-05-17  浏览次数:20581 次

新手学习jsp碰到表头的高度问题不会解决
表头上,我一个列: 身份证号码

却显示为:





我的宽度是足够的呀?
求助,我的代码如下:
<table width="1200" border="1" bgcolor="#039EFC" >
<tr>
<th width="50" height="2" >账号</th>
<th width="20" height="2" >类型</th>
<th width="40" height="2" >户名</th>
<th width="40" height="2" >当前余额</th>
<th width="20" height="2" >清户标志</th>
<th width="12" height="2" >开户日</th>
<th width="20" height="2" >开户金额</th>
<th width="20" height="2" >到期日</th>
<th width="20" height="2" >起息日</th>
<th width="20" height="2" >存期</th>
<th width="20" height="2" >最后交易日</th>
<th width="30" height="2" >身份证号码</th>
<th width="30" height="2">维护人</th>
  </tr>

后面的数据是从数据库读取出来的

------解决方案--------------------
我这里显示正常。。
------解决方案--------------------
把<th>元素的width属性全部删除,浏览器就可以自动调节宽度,测试可行
------解决方案--------------------
探讨

引用:

把<th>元素的width属性全部删除,浏览器就可以自动调节宽度,测试可行


我现在高度也去掉了,显示是正常了
这样的情况是根据字段显示的长度自动调节的吗?
没办法固定长度吗?