css在IE,FF下兼容问题

来源:百度知道 编辑:UC知道 时间:2024/05/30 18:41:23
以下这段代码在IE下正常,但在FF下就不美观了。帮忙找一找问题修改一下并解释一下。

<!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>

<title>www.</title>

<style>
*{margin:0; padding:0;font-family:Verdana, "宋体", Arial; font-size:12px; line-height:1.8;}
ul,li{list-style:none;}
a:link,a:visited{color:#000;text-decoration: none;}
a:hover,a:active{color:#CC0000;text-decoration: none;}
#c{ background:#FFCC33; border-top: 1px solid #fff; padding:5px 15px;}
#tags{ position:absolute; margin-top:-28px;}
h1{ font-size:18px;}
p{ background: #FF9900; padding:2px 15px; bord

如需交流请百度hi联系

成功解决,IE火狐显示一个样

修改地方
1.
#tags{ position:relative; margin-top:-28px;float:right;border:0;}
2.
#tags .z{font-weight: bold; background:#FF9900; border: 1px white white;}

完整代码如下

<!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>

<title>www.</title>

<style>
*{margin:0; padding:0;font-family:Verdana, "宋体", Arial; font-size:12px; line-height:1.8;}
ul,li{list-style:none;}
a:link,a:visited{color:#000;text-decoration: none;}
a:hover,a:active{color:#CC0000;text-decoratio