请教高手css height的一个莫名其妙的问题
要修改个页面,遇到个问题,我样式不是专长,郁闷得饭都吃不下,代码经剥离已经最简化,如下:
<!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>test</title> <style type="text/css"> html,body { margin:0; font:12px Arial,Helvetica,sans-serif,宋体; color:#333; background:#474747;}/*=== html,body标签,以及MOZ的模块兼容 ===*/body>table,body>div {clear:both;} /* M0Z */ #Top { width: 980px; padding: 101px 10px 0px; margin: 0px auto 0px; position: relative; } #Top-menu li { float: left; } #Top-menu li a { float: left; text-decoration: none; } #login { height: 25px; margin-top: 0px; *margin-top:-101px;/*ie6/7 hack*/}/*二级导航栏*/ #Top-under { width: 980px; margin: 0px auto; } #Top-under-l { float: left; } #Top-under-l li { float: left; } #Top-under-l li a { float: left; } .fleft { float: left; } .fright { float: right; } .clearer { clear: both; } </style></head><body> <div id="Top"> <ul id="Top-menu"> <li id="index" class="m-c"><a href="/"><span>首页</span></a></li> </ul> <div class="clearer"> </div> <div id="login" > <div class="fleft"> xtextx</div> <div class="fright" id="usrInfo"> <a onclick="this.innerText='valid'" style="cursor:hand;">[登录]</a> </div> </div> <div id="Top-under"> <ul id="Top-under-l"> <li><span><a href="#">精彩推荐</a></span></li> </ul> <div class="clearer"> </div> </div> </div></body></html>