其中的css倒数第二行:#nav li.sfhover ul {left: auto;}是怎么确定下拉菜单位置的 left:auto是什么意思 auto改为定值就不行,auto是怎么确定的位置
效果是这样的 下拉菜单自动在鼠标所指的block下边。
<!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=utf-8" />
<title>经典的蓝色CSS下拉菜单</title>
</head><style>
*{margin:0;padding:0;border:0;}
#div_center { width:790px; height:23px; background:#003399; margin-left: auto;margin-right:auto;}  
#nav { line-height: 20px; list-style-type: none; margin-top:5px;} 
#nav a { display: block; width: 77px; text-align:center; font-size:12px;} 
#nav a:link  { color:#FFF; text-decoration:none;margin:0;} 
#nav a:visited  {color:#FFF;text-decoration:none;margin:0;}
#nav a:hover {color:#C00;text-decoration:none;}
#nav li {float: left;}
#nav li a:hover{background:#FFFFFF;} 
#nav li ul {line-height: 24px; background:#FFF; list-style-type: none;text-align:left;left: -999em; width:132px; position: absolute;border-width: 1px;border-top-style: none;border-right-style: solid;border-bottom-style: solid;border-left-style: solid;border-color: #003399; padding:1px;} 
#nav li ul a{display:block; width: 130px;text-align:left;padding-left:2px;} 
#nav li ul a:link  {color:#0d5097; text-decoration:none;}  
#nav li ul a:visited  {color:#0d5097;text-decoration:none;}  
#nav li ul a:hover  {color:#FFF;text-decoration:none;font-weight:normal;background:#003399;}
#nav li:hover ul {left: auto;}
#nav li.sfhover ul {left: auto;}
#content {clear: left;}
</style>
<body>
<script type=text/javascript>
<!--
function menuFix() {
    var sfEls = document.getElementById("nav").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        }
        sfEls[i].onMouseDown=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        }
        sfEls[i].onMouseUp=function() {
        this.className+=(this.className.length>0? " ": "") + "sfhover";
        }
        sfEls[i].onmouseout=function() {
        this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), 
"");
        }
    }
}
window.onload=menuFix;
//--></script>
<div id=div_center>
<UL id=nav>
<LI style="MARGIN-LEFT: 10px"><A href="http://www.codefans.net">主站索引</A></LI>
<LI>
<A href="#">新闻中心</A> 
<UL>
<LI><A href="#">·新闻中心1</A></LI>
<LI><A href="#">·新闻中心3</A></LI>
</UL>
</LI>
<LI><A href="#">企业简介</A> 
<UL>
<LI><A href="#">·企业简介</A></LI>
<LI><A href="#">·产品中心</A></LI>
<LI><A href="#">·服务专区</A></LI></UL></LI>
<LI><A href="#">文章中心</A> 
<UL>
<LI><A href="#">·文章中心</A></LI>
<LI><A href="#">·文章中心</A></LI></UL></LI>
<LI><A href="#">国际新闻</A> 
<UL>
<LI><A href="#">国际新闻</A></LI>
<LI><A href="#">国内新闻</A></LI>
<LI><A href="#">科技新闻</A></LI></UL></LI>
<LI><A href="#">图片新闻</A> 
<UL>
<LI><A href="#">·图片中心</A></LI>
<LI><A href="#">·图片中心</A></LI></UL></LI>
<LI><A href="#">下载中心</A> 
<UL>
<LI><A href="#">·常用软件</A></LI>
<LI><A href="#">·文档下载</A></LI>
<LI><A href="#">社区论坛</A></LI></UL>
</UL>
</div>
</body>
</html>javascript下拉菜单