2012-02-19 7 views
0

それはdivタグがまた静的ヘッダーは、Firefoxで体をカバーIE

<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> 

側のテーブルどこ

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

HTMLを静的に滞在するように指示CSSで静的ではありません上部のメインテーブルはFirefoxでは伸びませんが、IEではそれがあります。

自分でテストしてくださいhere

答えて

0

Internet Explorerの条件付きコメントを使用して、IEに合わせたスタイルを読み込むことができます。

http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx

これは、一般的にクロスブラウザのCSSを使用する必要がありますが、それは効率的なこの1のようなニーズに応えるないその1つの問題の根本を解決しないでしょう。

0

あなたの言葉はちょっと混乱しています。有効なCSSの位置である「静的」ヘッダーと言っています。 position:staticですが、全く異なる効果を持つposition:fixedと宣言しています。不明な点があれば、その違いを調べる価値があります。

要素にposition:fixedを追加すると、効果的に要素の流れから取り除かれ、ブラウザウィンドウに対して固定されます。その下のすべての要素は、そこにもないようにシフトします。

あなたが持っているIEの問題はおそらく、ページ全体がテーブルで構築されているため、ブラウザ間で問題があり、不一致になる可能性があります。また、IEの古いバージョンはしませんposition:fixed

関連する問題