DIV:
<div
style="width:600pxoverflow:hidden">
<div
style="float:leftwidth:98pxheight:700pxborder:1px
solid
#000"></div>
<div
style="float:leftwidth:499pxheight:100pxborder:1px
solid
#000border-left:0px"></div>
<div
style="float:leftwidth:499pxheight:599pxborder:1px
solid
#000border-left:0pxborder-top:0px"></div>
</div>
直接用table+css很简单的就写出来了。为什么一定要DIV+CSS呢。该用table还是用table啥。直接用CSS控制表格的边框线就OK了。就用border-left,border-right,border-top,border-bottom.就性了。border-left:1px#ccc
solid
在网页中用css+div实现表格效果,首先我们需要理解的就是div是一个块级元素,可以在里面包裹其他的div,通过给这些div这是不同的高度,宽度,还有一些float属性,就可以实现如同表格一样的布局,具体看代码来理解下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<link rel="stylesheet" type="text/css" href="CSS-kuaidu.css"/>
<title>宽度的学习</title>
</head>
<body>
<div style="width:960pxheight:700pxmargin:0 autoborder:solid 1px #999999" >
<div style="width:960pxheight:25pxborder:solid 1px #CCCCCC">
导航条
</div>
<div style="width:960pxheight:80pxborder:solid 1px #CCCCCC">
店铺图片
</div>
<div style="width:200pxheight:400pxborder:solid 1px #CCCCCCfloat:left">
左侧目录
</div>
<div style="width:750pxheight:400pxborder:solid 1px #CCCCCCfloat:right">
右侧内容
</div>
<div style="width:960pxheight:17pxborder:solid 1px #CCCCCCfloat:left">
尾区
</div>
<div style="width:960pxheight:173px border:solid 1px #CCCCCCfloat:left">
尾招
</div>
</div>
</body>
</html>