日期:2014-05-18  浏览次数:20512 次

求助一个Li的问题!!
HTML code

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterOne_MasterPage" %>

<!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 runat="server">
    <title>无标题页</title>
<style type="text/css">
a:link {text-decoration:none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: underline;color: #FF6600;}
a:active {text-decoration: none;}
*{ margin:0px; padding:0px;}
img{ border:0px;}
li a{ list-style:none; float:left; width:100px; height:20px; margin:9px; display:block; overflow:hidden; font-size:20px; font-family:华文琥珀; color:Black; text-align:center;}
li a:hover{ background:url('../IMG/BGOne-Nav.png');}
</style>
</head>

<body style="display:block; overflow:hidden;">
    <div style="background:url('../IMG/BGOne-One.png'); background-repeat: no-repeat; display:block; overflow:hidden; margin:0 auto; width:1010px; height:300px; display:block; overflow:hidden;">
        <div style="width:1010px; height:200px; float:left; display:block; overflow:hidden;"></div>
        <div style="width:985px; height:38px;float:left; background-image: url('../IMG/BGOne-Two.png'); background-repeat: no-repeat; margin-left:13px; display:block; overflow:hidden;">
            <div style="float:left; overflow:hidden; display:block; width:15px; height:38px;"></div>
            <ul>
                <li><a href="#">首页</a></li>
                <li><a href="#">首页</a></li>
                <li><a href="#">首页</a></li>
                <li><a href="#">首页</a></li>
            </ul>
        </div>
    </div>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
</body>
</html>


页面浏览效果


问题: li 未去点。。。
问题2:li 横排未对齐

小弟粗心由来已久 大家看看错误在哪

------解决方案--------------------
你应该写成
li{ list-style:none; float:left; width:100px; height:20px; margin:9px; display:block; overflow:hidden; font-size:20px; font-family:华文琥珀; color:Black; text-align:center;}


而不是li a

你可以再单独定义
li a里面的颜色等
------解决方案--------------------
li是容器, 你没设置对齐啊
------解决方案--------------------
++
探讨

你应该写成
li{ list-style:none; float:left; width:100px; height:20px; margin:9px; display:block; overflow:hidden; font-size:20px; font-family:华文琥珀; color:Black; text-align:center;}


而不是li a

你可以再单独……

------解决方案--------------------
li a{

==>

li{