CSS+DIV做一个这样的表格

CSS+DIV做一个这样的表格
<!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/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{ margin:0; padding:0}
body{ padding:100px; font-size:12px; line-height:1.8}
div,dl{ background:#FFFF99; border:1px solid #FF9900; width:200px; margin-top:-1px;}
dl{ border:none; border-bottom:1px solid #FF9900;}
dd{ width:129px; background:#FFCC00; float:left; border-right:1px solid #FF9900}
dt{ width:70px; background:#FFCC00; float:right;}
</style>
</head>
<body>
<div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div><div>
  <dl>
    <dd>001</dd>
    <dt>002</dt>
  </dl>
  <span>003</span>
</div>
</body>
</html>

你可能感兴趣的:(html,css,XHTML)