2010-11-28 60 views
0

我搜索了很多文章,ie6無法支持位置:固定,也許設置的位置:絕對和頂部的位置。但我嘗試過很多次都不行。誰能幫我修改我的密碼?(影響的分析是,在IE8我的代碼顯示)位置:固定 - 在IE6中發佈。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
<style type="text/css"> 
html, body{width:100%;height:100%;margin:0;padding:0;background-color:#fff;} 
#headerwarp{width:100%;height:78px;margin:0;padding:0;position:fixed;left:0;top:0;z-index:10;} 
#headertop{width:100%;height:28px;margin:0;padding:0;background-color:blue;position:fixed;left:0;top:0;z-index:10;} 
#headerbottom{width:100%;height:50px;margin:0;padding:0;background-color:green;position:fixed;left:0;top:28px;z-index:10;} 
#footerwarp{width:100%;height:53px;margin:0;padding:0;position:fixed;left:0;bottom:0;z-index:10;} 
#footerbottom{width:100%;height:65px;margin:0;padding:0;background-color:#000;z-index:10;} 
#localcontent{width:100%;margin:0;padding:78px 0 105px 0;top:0;} 
#content1{position:fixed;width:100%;height:20px;margin:0;padding:0;background-color:#ff0;z-index:10;top:78px;} 
#content2{position:fixed;width:100%;height:25px;margin:0;padding:0;background-color:#f00;z-index:10;top:98px;} 
.box{width:100%;position:relative;top:45px;padding:0;margin:0;} 
.slide {margin:10px;} 
.sl{width:100%;} 
li{margin:0 0 5px 0;padding:0;list-style:none;} 
ul li,li{width:400px;overflow:hidden;position:relative;} 
.contenttop{height:25px;position:fixed;z-index:10;top:123px;padding:0;margin:0;width:290px;background-color:#0FF;} 
.contentbottom{width:400px;float:left;padding:0;margin:0;height:1000px;} 
.col1, .col2, .col3{float:left;padding:0;margin:0 3px 0 3px;} 
.pcol1, .ptcol1{float:left;margin:0 0 6px 0;} 
.ptcol1{text-align:center;font-size:14px;color:#222;font-weight:bold;padding:0;position:fixed;z-index:10;top:148px;background:#f00;} 
.pcol1{padding:2px;position:relative;top:30px;background:#ff0;} 
.col1, .ptcol1{width:139px;} 
.pcol1{width:135px;} 
</style> 
</head> 
<body> 
<div id="headerwarp"> 
<div id="headertop"> 
    </div> 
    <div id="headerbottom"> 
    </div> 
</div> 
<div id="localcontent"> 
     <div class="box"> 
     <div id="content1"> 
      </div> 
      <div id="content2"> 
      </div> 
      <div id="sl"> 
       <ul class="ul" style="z-index:1;"> 
        <li class="li"> 
        <div class="contenttop"> 
          content 
         </div> 
         <div class="contentbottom"> 
          <div class="col1"> 
          <div class="ptcol1"> 
           content1 
           </div>         
           <div class="pcol1"> 
           111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/> 
           </div> 
          </div> 
          <div class="col1"> 
          <div class="ptcol1"> 
           content2 
           </div>         
           <div class="pcol1"> 
           111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/>111<br/> 
           </div> 
          </div> 
         </div>       
        </li> 
       </ul> 
      </div> 
     </div> 
</div> 
<div id="footerwarp"> 
<div id="footerbottom"> 
    </div>  
</div> 
</body> 
</html> 
+0

首先你需要使用CSS重置。你不需要在你使用的每個元素中聲明相同的CSS屬性。這是瘋了,這就是爲什麼你頭痛。只需谷歌CSS重置和或使用雅虎:(http://developer.yahoo.com/yui/3/cssreset/)。如果你知道如何重新編碼你的工作並使用解決方法,包括在IE6中的定位,那麼一切都可以完成。我注意到誰會給你一個答案你的問題,只是一個建議... – Jonathan 2010-11-28 16:13:35

回答

0

我不會聲稱這是我自己的解決方案,因爲這是不公平到投入了這麼多的努力的人修復它,但我相信你可能想看看Stu Nicolls的網站(CSS Play