枠と内容の間にマージンを指定する

[統計] HTMLからXHTMLへの移行を進めていますか?


<frame src="" marginwidth="" marginheight="">

ブラウザ
Internet Explorer Netscape Firefox Opera

frameタグmarginwidth=""marginheight="" を追加すると、フレームの枠と内容との間にマージンを指定できます。


<frame src="example.html" marginwidth="10" marginheight="10">


marginwidth="" 左右のマージンをピクセル数で指定します
marginheight="" 上下のマージンをピクセル数で指定します

使用例

<html>
<head>
<title>フレームサンプル</title>
</head>

<frameset cols="33%,*,33%">
<frame src="example13a.html">
<frame src="example13a.html" marginwidth="30" marginheight="30">
<frame src="example13a.html" marginwidth="0" marginheight="0">

<noframes>
<body>
<p>ここにフレーム未対応ブラウザ向けの内容</p>
</body>
</noframes>


</frameset>

</html>


この例では、左のフレームは指定なし、中央のフレームはマージンを30ピクセルに指定、右のフレームはマージンを0に指定しています。

これをブラウザで見ると次のように表示されます



[特集] レンタルサーバー比較 & サーバー選びのチェックポイント