DIV+CSS设计的一个问题

来源:百度知道 编辑:UC知道 时间:2024/06/29 02:10:09
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
#body{font-size:12px;background:#D8D8D8;color:#4B4E4B;}
*{margin:0px; padding:0px; list-style:none;font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;text-decoration: none;}
#main{height:1%;width:760px; margin:0px auto; padding:0px 8px;border-left:1px #A0A0A0 solid;border-right:1px #A0A0A0 solid;background:#ffffff;}
#main:after{padding:0px;content:'.';display:block;clear:both;visibility:hidden;height:0;}
.top5,.top6{float:left;}
.top5,.top6{height:29px;line-height:29px;background:#2F5F8E;}

悬赏太高,估计不能给。
IE和FF有多少样式的解析不同,还是好好看看吧
用了FLOAT PADDING 后要考虑一下兼容问题,IE和FF对PADDING的解析是不一样的
而且WIDTH和HEIGHT最好不要用1%这样的东西定义
话就这么多,你要是想把上面的代码修改正确,还是自己改的好。

用这个!important

设置两个相同的属性中间加上!important前边的是firefox浏览器显示属性
后面是ie显示的属性

例 margin:101px auto 0px !important;
margin:7px auto 3px;

建议看看ie和firefox在这方面的兼容分析
http://yclhq.qizai.com/Article.asp?id=69