0

互換性のヘルプが必要です。私のウェブサイトはブラウザで異なって見えます。Chrome / Firefoxなどは正しく見えますが、IEが台無しになっています。見てください:http ://southwestarkansasradio.com/joomla

私はJoomla2.5を使用しています。検索ボックスが左に移動し、オンエアボックススクリプトがIEで機能しません。コードは以下にあります、あなたは助けることができますか?ありがとう。

<table border="0">
<tr>
<th>
<center><img style="float: left;"
src="http://www.southwestarkansasradio.com/images/onair995.jpg" alt="" height="35"     
width="316" /><br><img 
src="http://www.southwestarkansasradio.com/images/playerbackground.jpg" width="316" 
height="216" alt="" border="1"><div id="now playing" style="position: absolute; top: 
60px; left: 20px;>

<!--[if IE]>

<iframe src="http://www.southwestarkansasradio.com/NowPlaying.html" name="nowplaying"   
style="height:216px" "width:316px" frameborder="0" scrolling="no" border="none" 
allowtransparency="true" valign="top" ></iframe>

<![endif]-->

<!--[if !IE]>-->

<iframe src="http://www.southwestarkansasradio.com/NowPlaying.html" name="nowplaying" 
style="height:216px" "width:316px" frameborder="0" scrolling="no" border="none" 
valign="top" ></iframe>

<!--<![endif]-->

</div></center>
</th></tr></table></div>
4

1 に答える 1

0

そのhtmlは、このような小さなコードでは本当に読みにくいものです。インデントを使用すると、間違いを見つけやすくなります。間違ったことがいくつかありました:

  • スニペットに開始divがありませんでした
  • 「現在再生中」のdivの1つには、IDにスペースがあります。HTMLIDにスペースを含めることはできません。
  • brタグの末尾にスラッシュが必要です
  • 現在再生中のdivでcssスタイルを閉じていません。つまり、閉じたアポストフを忘れています。これは問題を引き起こすでしょう。
  • iframeにはvalignプロパティがありません
  • iframeの高さと幅が正しく形成されていません
  • iframeにはborderプロパティがありません

次のようなものの方がうまくいくはずですが、サーバーでデバッグできなければ、当て推量になります。とにかく、私が言ったように、私はそれをあなたの構造にかなり保ち、明らかなものを修正して修正しましたが、サイトでそれを試してみるとおそらくまだいくつかの問題がありますが、それはあなたを近づけます。しかし、私は確かにこのようにはしません。

w3cバリデーターは便利なツールです。

<div>
    <table border="0"> 
        <tr> 
            <th> 
                <center>
                    <img style="float: left;" src="http://www.southwestarkansasradio.com/images/onair995.jpg" alt="" height="35" width="316" />
                    <br/>
                    <img src="http://www.southwestarkansasradio.com/images/playerbackground.jpg" width="316" height="216" alt="" border="1">

                    <div id="nowplaying" style="position: absolute; top: 60px; left: 20px;"> 
                        <!--[if IE]>
                            <iframe src="http://www.southwestarkansasradio.com/NowPlaying.html" name="nowplaying" height="216px" width="316px" frameborder="0" scrolling="no" allowtransparency="true" ></iframe> 
                        <![endif]-->

                        <!--[if !IE]>--> 
                            <iframe src="http://www.southwestarkansasradio.com/NowPlaying.html" name="nowplaying" height="216px" width="316px" frameborder="0" scrolling="no" ></iframe> 
                        <!--<![endif]--> 
                    </div>
                </center>
            </th>
        </tr>
    </table>
</div> 

これは単なるハックですが、IE8およびIE9(IE7を試したことがない)の検索ボックスを移動するには、テンプレートのindex.phpのヘッドセクションに以下を追加します。検索ボックスを「押す」だけです。

<!--[if IE]>
<style type="text/css">
div.topmenu
{
    width: 250px !important;
}

div.search
{
    margin-left: 30px !important;
}
</style>
<![endif]-->
于 2012-04-20T22:25:57.277 に答える