当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 用div和ul标签画表格进行布局兼容火狐、ie6、ie7、Opera等浏览器

CSS样式表
CSS教程之css选择器 、属性、值
CSS的color颜色使用说明
firefox css自动换行的实现方法
css支持标准的图片垂直居中
css+table 1px边框单元格
css之使table也能overflow:hidden
几个常用经典的css技巧
css 跨浏览器实现float:center
css浏览器不兼容原因分析及解决办法
iframe transparent透明背景方法
有衬线字体与无衬线字体比较
div+css在思路和流程上实现结构与表现的分离分析
css教程 css和document
层盖住下拉列表框问题解决方案
css样式之区分input是按钮还是文本框的方法
CSS expression控制图片自动缩放效果代码[兼容 IE,Firefox]
谈谈网页设计中的字体应用Font Set
XHTML标签的自关闭写法的坏处分析
顶级经典常用的CSS属性收集整理
10条影响CSS渲染速度的写法与使用建议

CSS样式表 中的 用div和ul标签画表格进行布局兼容火狐、ie6、ie7、Opera等浏览器


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 239 ::
收藏到网摘: n/a


代码如下:

<html>
<head>
<style>
<!--
#table {
width:701px!important;
width:700px;
border-top:1px #000 solid;
}
#table ul {
margin:0px;
padding:0px;
width:701px!important;
width /**/:700px;
list-style-type:none;
border-bottom:0px #000 solid;
border-left:0px #000 solid;
}
#table li {
float:left;
display:block;
margin:0px;
padding:0px;
width:139px!important;
width:139px;
width /**/:140px;
border-right:1px #000 solid;
border-bottom:1px #000 solid;
}
-->
</style>
</head>
<body>
<center>
用div和ul标签画表格进行布局兼容火狐、ie6、ie7、Opera等浏览器
<div id="table" style="margin-left:auto; margin-right:auto; text-align:center">
<ul style="background-color:Silver; color:red">
<li style="border-left:1px #000 solid;">项目编号</li>
<li style="letter-spacing:3pt">网址</li>
<li>名称</li>
<li>从事业务</li>
<li>联系电话</li>
</ul>
<ul>
<li style="border-left:1px #000 solid;">1</li>
<li>www.ruanchen.com</li>
<li><a href="http://www.ruanchen.com">软晨学习网</a></li>
<li>400电话申请</li>
<li>4006-1234-10</li>
</ul>
<ul>
<li style="border-left:1px #000 solid;">2</li>
<li >www.ruanchen.com</li>
<li><a href="http://www.ruanchen.com">软晨学习网</a></li>
<li>中文搜索</li>
<li>无</li>
</ul>
<ul>
<li style="border-left:1px #000 solid;">3</li>
<li>www.baidu.com</li>
<li><a href="http://www.baidu.com">百度 </a></li>
<li>新闻娱乐体育</li>
<li>无</li>
</ul>
</div>
</center>
</body>
</html>