专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 跨浏览器开发

火狐浏览器CSS格式表格显示不正常解决办法

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
火狐浏览器CSS格式表格显示不正常
从数据库中读出表格在页面上显示出来,其它浏览器CSS完全正常,火狐的显示出现问题,求大神帮忙看一下!代码如下
显示页面
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="css/table.css">
<title>现场维护人员信息</title>
</head>
<body style="background-image:url(images/body.jpg)">
<span class="hd">现场维护人员信息</span>
</br>
</br>
<?php
require_once("init.php");
 $sql="select * from field_maintenance_infor";
 $result=mysql_query($sql);
 $row=mysql_num_rows($result);
 $colums=mysql_num_fields($result);

 echo "<table class='t1' border='1'><tr>";
 //表头
 for($i=0;$i<$colums;$i++){
 $field_name=mysql_field_name($result,$i);
 echo "<th>$field_name</th>";
   
 }
 echo "</tr>";
 while($row=mysql_fetch_row($result)){
 echo "<tr>";
 for($i=0;$i<$colums;$i++){
 echo "<td>$row[$i]</td>";
 
 }
 echo "</tr>";
 }
 echo "</table>";
 mysql_free_result($result);
?>
</body>
</html>
CSS样式:
    body {
        border: 1px solid #2C2E2F;
width:100%;
height:100%;
        margin: 0 auto;
    } 

.hd{
font-size: 25px;
color: white;
font-family: YouYuan;
display:block;
margin:auto;
text-align:center;
margin-top:20px;
}
.t1{
font-size: 18px;
color: white;
font-family: YouYuan;
display:block;
text-align:center;
margin-left:430px;
background-color:#2C2E2F;
height:30px;
}
.t1 caption{
font-size:20px;
font-weight:bold;
}
.t1 th{
background-color:#161616; 
height:40px;
}
火狐浏览器效果:

其他浏览器正常效果:

------解决思路----------------------
.t1{
font-size: 18px;
color: white;
font-family: YouYuan;
display:block;
text-align:center;
margin-left:430px;
background-color:#2C2E2F;
height:30px;
}

红色的不要
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: