2009-04-06 5 views
7

私はそれらの間にスペースのない2つのフレームを持っていたいと思います。ここに私のテストケースがあります:2つのフレーム間にスペースを入れずに2つのフレームを作成するにはどうすればよいですか?

<html> 
    <frameset framespacing="0" rows="50%, 50%"> 
    <frame frameborder="0" src="red.html" scrolling="no" noresize="1" /> 
    <frame frameborder="0" src="red.html"        /> 
    </frameset> 
</html> 

red.htmlだけです:

<html><body bgcolor="red"></body></html> 

私はこれをレンダリングすると、しかし、私は2つのフレーム間の白い線を得ます。どのように私はそれを遠ざけるには?

答えて

-3

ここでは、私が過去に使用した白い線がない作業コードの例を示します。

<frameset rows="10%,*" noresize framespacing=0 frameborder=no border=0 > 
     <frameset cols="140,*" noresize framespacing=0 frameborder=no border=0 > 
      <frame name="globe" scrolling="no" src="./GIF/globe.jpg" marginwidth="0 marginheight="0"> 
     <frame name="logo" src="logo.htm" scrolling="no" > 
</frameset> 
     <frameset cols="160,*" noresize framespacing=0 frameborder=no border=0 > 
     <frame name="userselections" src="userselections.php" scrolling="auto"> 
     <frame name="results" src="nothing.htm" scrolling="auto"> 
    </frameset> 
    <noframes> 
     <body> 
     <p>This page uses frames, but your browser doesn't support them.</p> 
     </body> 
    </noframes> 
</frameset> 
+0

これは有効なマークアップではありません。閉じた 'frame'タグと' frameset'タグがあるはずです。また、 "This page uses frames ..."ビットが 'noframes'タグの中にあるように見えます。 –

9

FramesetタグにFrameBorderプロパティを指定する必要があります。 だから、あなたのメインページは次のようになります。

<html> 
    <frameset framespacing="0" rows="50%, 50%" frameborder="0"> 
    <frame frameborder="0" src="red.html" scrolling="no" noresize="1" /> 
    <frame frameborder="0" src="red.html"        /> 
    </frameset> 
</html> 

これはあなたの問題を解決します。

0

フレームセットタグに枠線を追加します。

+0

私は5分前にその答えを持っていました...しかし、コードを回答ボックスに貼り付けると、クロムのページレンダリングが完全に失敗しました。 – alumb

1
<html> 
    <frameset framespacing="0" rows="50%, 50%" framespacing="0" frameborder=no> 
    <frame frameborder="0" src="red.html" scrolling="no" noresize="1" /> 
    <frame frameborder="0" src="red.html"        /> 
    </frameset> 
</html> 

frameborder = noは非常に重要です。

0

frameborder属性の代わりにcssスタイルを使用することを常にお勧めします。

<frameset cols="50%,50%"> 
<frame src="frame_1.htm" style="border:none"> 
<frame src="frame_2.htm"> 
</frameset> 

可能な限りiframeとdivsを使用する方が効果的です。

さらにフレームセットはHTML5ではサポートされていません。

関連する問題