div+css做表格儲存格

來源:互聯網
上載者:User

請看效果:

實現代碼:

<html><head><style type="text/css">.divout{  width:322px;  height:122px;  border:1px outset #000000;  margin:0 auto;  margin-top:100px;}.divin{  margin-left:2px;  margin-top:2px;  width:314px;  height:114px;  border:1px inset #000000;  padding:1px;  text-align:center;  height:114px;  line-height:114px;}</style></head><div class="divout" >  <div class="divin">div</div></div><br/><table border="1" width="324px" height="124px" align="center" >  <tr>    <td align="center">表格儲存格</td>  </tr></table><body></body></html>

firefox實現效果,不考慮其它瀏覽器,注意我的HTML最上面沒用DTD,不習慣用,因為對它還不是很瞭解。

如果你想用ie實現相同效果,改下邊框顏色應該就OK了,關於上邊的link元素,請大家無視它,因為我就在

blog.css裡面加了背景處理和.cod{width:734px}而已。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.