2012-02-19 9 views
0

,告訴它留靜態靜態頭覆蓋身體在Firefox,是不是在IE

#fruko { 
      position: fixed; 
     } 
     #links { 
      position: fixed; 
     } 

的HTML,其中的div標籤是

<td width="225px"><div id="fruko"><p><a href="#top" style="text-decoration: none"><font color="Red" size="8">Fruko, inc.</font></a></p></div></td> 
     <td><div id="links"><table border="5" cellpadding="5" cellspacing="0" width="100%"> 
       <tr> 
        <td align="center"><a href="#apps" style="text-decoration: none"><font size="6" color="Red">Apps</font></a></td> 
        <td align="center"><a href="#programs" style="text-decoration: none"><font size="6" color="Red">Programs</font></a></td> 
        <td align="center"><a href="#webs" style="text-decoration: none"><font size="6" color="Red">Websites</font></a></td> 
        <td align="center"><a href="#news" style="text-decoration: none"><font size="6" color="Red">News</font></a></td> 
        <td align="center"><a href="#social" style="text-decoration: none"><font size="6" color="Red">Social</font></a></td> 
        <td align="center"><a href="#about" style="text-decoration: none"><font size="6" color="Red">About</font></a></td> 
       </tr> 
      </table> 
     </div></td> 

另外在側面表中的CSS靜態頂部的主表不會在Firefox中伸展,但它在IE中。

自己測試here

回答

0

你的措辭有點混亂。你在說'靜態'標題,這是一個有效的CSS位置,例如position:static,但是你聲明的是position:fixed,它具有完全不同的效果,如果你不清楚的話,值得對差異進行研究。

position:fixed添加到元素可以有效地將其從元素流中移出並使其相對於瀏覽器窗口「固定」。它下面的所有元素都會向上移動,就像它不在那裏一樣。

您遇到的任何IE問題都可能與整個頁面使用表格構建的事實有關,這些表格可能在瀏覽器之間存在問題和不一致。此外,舊版本的IE不會做position:fixed