首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

图片撑大表格有关问题

2012-09-28 
图片撑大表格问题tabletrtd width10 width245style background-color:Red padding:0px mar

图片撑大表格问题
<table>
  <tr>
  <td width="10" width="245" style=" background-color:Red; padding:0px; margin:0px;">
  <img src="images/shouye_026.gif" width="245" height="10" style=" border-bottom-style:none; margin:0px; padding:0px; "/>
  </td>
  </tr>
  </table>

我这里有一张图片,我要让他填充表格,然后这二个图片的大小是245*10,但是当我这样设置后,我发现,显示出来的结果并不是我想像的那样,图片并没有完全填充表格,表格中出现了红色的背景色,也就是说图片本身的大小没有变化,但是把表格中的单元格的宽度增加了

[解决办法]
[code=HTML]
<table>
<tr>
<td width="245" height="10" style=" background-color:Red; padding:0px; margin:0px;">
<img src="images/shouye_026.gif" width="100%" height="100%" style=" border-bottom-style:none; margin:0px; padding:0px; "/>
</td>
</tr>
</table>
[/code
[解决办法]

HTML code
<table>  <tr>  <td width="245" height="10" style=" background-color:Red; padding:0px; margin:0px;">  <img src="images/shouye_026.gif" width="100%" height="100%" style=" border-bottom-style:none; margin:0px; padding:0px; "/>  </td>  </tr></table> 

热点排行