1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

大家帮我看下这段代码为什么在FF下正常IE下却不正常

本帖由 老李2008-07-04 发布。版面名称:前端开发

  1. 老李

    老李 New Member

    注册:
    2006-04-05
    帖子:
    2
    赞:
    0
    谢谢了.

    HTML:
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>xxxx</title>
    <style type="text/css">
    <!--
    *{
    	margin:0;
    	padding:0;
    	list-style-type:none
    }
    .logo{
    	width: 430px;
    	margin-top: 120px;
    	margin-left: 285px;
    	text-align:center;
    }
    .lists{
    	width: 430px;
    	margin-top: 20px;
    	margin-left: 285px;
    	border: 1px dotted #CCCCCC;
    	height:100px;
    }
    .lists ul{
    	margin-left: 0px;
    }
    .lists li{
    	margin-left:10px;
    	margin-top:10px;
    	text-align:center;
    	overflow:hidden;
    	list-style-type: none;
    	float:left;
    	width:130px;
    	background-color: #99CC66;
    	padding-top: 8px;
    	padding-bottom: 8px;
    }
    .lists li a:link{
    	font-size: 14px;
    	width:130px;
    	color: #000000;
    	text-decoration: none;
    }
    .lists li a:visited{
    	font-size: 14px;
    	width:130px;
    	color: #000000;
    	text-decoration: none;
    }
    .lists li a:hover{
    	font-size: 14px;
    	width:130px;
    	color: #006600;
    	text-decoration: underline;
    	font-style: italic;
    	font-weight: bold;
    	background-color: #99CC00;
    }
    
    Div {
    	font-size: 14px;
    }
    -->
    </style>
    </head>
    <body>
    <div class="logo"><img src="img/logo.gif" /></div>
    <div class="lists">
    <div>
      <ul>
        <li><a href="#">XXXXXX</a></li>
        <li><a href="#">XXXXXX</a></li>
        <li><a href="#">XXXXXX</a></li>
        <li><a href="#">XXXXXX</a></li>
        <li><a href="#">XXXXXX</a></li>
        <li><a href="#">XXXXXX</a></li>
      </ul>
      </div>
    </div>
    
    </body>
    </html>
    
     
  2. 老李

    老李 New Member

    注册:
    2006-04-05
    帖子:
    2
    赞:
    0
    解决了
    浮动后本来外边距10px,但IE解释为20px,解决办法是加上display:inline