当前位置: 代码迷 >> HTML/CSS >> 新手提问,如何设HTML里面表格高度为100% ,即自适应浏览器高度
  详细解决方案

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

热度:243   发布时间:2012-02-21 16:26:23.0
新手提问,怎么设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>
  相关解决方案