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

新手提问,如何设HTML里面表格高度为100% ,即自适应浏览器高度

2012-02-21 
新手提问,怎么设HTML里面表格高度为100% ,即自适应浏览器高度如题[解决办法] body style height:100%

新手提问,怎么设HTML里面表格高度为100% ,即自适应浏览器高度
如题

[解决办法]
<body style= "height:100%; width:100%; margin:0px; ">
<table width= "100% " height= "100% " border= "1 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> &nbsp; </td>
<td> &nbsp; </td>
</tr>
<tr>
<td> &nbsp; </td>
<td> &nbsp; </td>
</tr>
</table>
</body>

[解决办法]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN "
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> test </title>
</head>
<body>
<body style= "height:100%; margin:0; ">
<table width= "100% " height= "100% " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td height= "100% ">
<table width= "100% " height= "100% " border= "1 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> test </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</body>
</html>

热点排行