フレーム構造のページで左右上下の余白を0にしたいのですが、以下の何れの

回答受付中の質問

フレーム構造のページで左右上下の余白を0にしたいのですが、以下の何れの

フレーム構造のページで左右上下の余白を0にしたいのですが、以下の何れの方法でも
ほとんど変化がありません。

1.<frame src="green.html" marginwidth="0" marginheight="0">
2.<body style="margin:0px;padding:0px;">
3.<style type="text/css">
   <!--
body { margin:0px;padding:0px;}
  -->
  </style>

確実な方法を教えてください。

宜しくお願い致します。

投稿日時 - 2010-01-27 15:03:17

連想キーワード:

QNo.5627341

すぐに回答ほしいです

7人が「このQ&Aが役に立った」と投票しています

[  前へ  |  次へ ]

回答(2件中 1~2件目)

ANo.2

こんにちは
自身が作成したものでは、余白無く見れているのですが?
多少構造は違うと思いますが、簡単にソース書きます。

●FramesetのHTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head>
 <title>frameset</title>
 </head>
<frameset cols="200px,*">
<frame src="left.html" name="left" noresize scrolling="no"/>
<frame src="right.html" name="right" noresize />
</frameset>
<noframe>

</noframe>
</html>

読み込むHTMLとCSS

●right.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="ja" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="auther" content="" />
<link rel="stylesheet" href="css/1.css" type="text/css" media="all" />
</head>
<body>
<div id="wrap">
main
</div>
</body>
</html>

●style.css

*{
margin :0px;
padding: 0px;
}
body{
margin: 0px;
padding: 0px;
font-family: "Times New Roman",Times,serif;
}
#wrap{
margin: 0px;
padding: 0px;
background-color: #000000;
color: #ffffff;
}

おそらく読み込むファイルの設定が問題だと思います。
参考になるかわかりませんが確認ください。

投稿日時 - 2010-01-28 19:10:21

お礼

解決しました。ありがとうございます。

投稿日時 - 2010-01-29 10:36:46

ANo.1

こんにちは

フレーム内の余白をなくすには、読み込むhtmlファイルのCSSに対して

*{
margin: 0;
padding: 0;
}

を加えればとりあえず余白はなくなると思います。

投稿日時 - 2010-01-28 09:18:00

お礼

ありがとうございます。

ただ、CSSに指定してみましたが、ほとんど変化が見られませんでした。

何が悪いのかヒントを頂けますか?

投稿日時 - 2010-01-28 13:44:50

あわせてチェックしたい
  • ネスケでの右余白 ...
  • ★CSS★formのmargin ...
  • frame をセンタリングしたい ...
PR
【回答募集中】花粉にひと言、物申す![ 詳細 ]

OKWaveのオススメ

教えて弁護士さん!

お金の悩みQ&A特集はこちら