半点优化网 http://www.bdxc.net/
当前位置首页 > 网站建设> 正文

网站设计表格的运用

2022-10-05 16:12:33 暂无评论 151 网站建设 网页制作   排版   表格

使用表格不一定要结合CSS定位的,表格可以当作框架用来布局网站整体结构,表格层叠就要结合CSS定位

设计网页表格怎么布局?

给你看看一个简单的实例:


<html>
<head>
<title>浏览器对待background-color的不同</title>
<style type=text/css>
<!--
.chara1{
 font-family:Arial, Helvetica, sans-serif;
 font-size:12px;
}
.tableborder{
 border:1px solid #000000;
}
.cell{
 border:10px dashed #000000;
 text-align:center;
 background-color:#e799f8;
}
-->
</style>
   </head>
<body>
<table cellpadding=10 cellspacing=25 class=chara1 tableborder>
 <tr>
  <td class=cell height=80px width=120px>content</td>
 </tr>
</table>
</body>
</html>

网页制作中表格排版

你可以把这个几个表格都放在一个表格里,先设置一个三行一列的表格;再把第一行设置成三列;在第一行第一列插入第一个竖表格,第一行第三列插入第二个竖表格,第三行插入一个横表格;设置第二行的高度(即两个竖表格和横表格之间的间隙了)代码如下:


<table width=1003 border=0 cellspacing=0 cellpadding=0>


<tr>


<td width=250>
<!--第一个竖表格-->
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td align=center valign=middle height=200>第一个竖表格</td>
</tr>
</table>
</td>


<td width=10></td>
<td width=750>
<!--第二个竖表格-->
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td align=center valign=middle height=200>第二个竖表格</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=3 height=10></td>
</tr>
<tr>
<td colspan=3>
<!--第一个横表格-->
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td align=center valign=middle height=150>第一个横表格</td>
</tr>
</table>
</td></tr> </table>

随机文章


    Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/bdxc.net/e/class/connect.php) is not within the allowed path(s): (/www/wwwroot/www.bdxc.net/:/tmp/) in /www/wwwroot/www.bdxc.net/1.php on line 4

    Warning: require(/www/wwwroot/bdxc.net/e/class/connect.php): failed to open stream: Operation not permitted in /www/wwwroot/www.bdxc.net/1.php on line 4

    Fatal error: require(): Failed opening required '/www/wwwroot/bdxc.net/e/class/connect.php' (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/www.bdxc.net/1.php on line 4