dポイントプレゼントキャンペーン実施中!

ヘッダーとンイメージはそれぞれdivで囲んでいます。IE6でヘッダーとメインイメージの間に微妙な隙間が隙間が空いてしまいます。FOXでは隙間は空きません。なぜでしょうか?
教えてください。
==HTML==
<div id="header"><img src="images/head.gif" width="821" height="161" border="0" usemap="#Map2" />
<map name="Map2" id="Map2">
<area shape="rect" coords="674,124,775,144" href="#" /><area shape="rect" coords="36,17,322,85" href="#" />
</map></div>
<div id="main_img" align="center"><img src="images/main_flash.jpg" width="801" height="305" border="0" /></div>

==css==
/*==ヘッダー関係==*/
#header img{
margin:0 0 0 0;
padding:0;
height:161px;
}

/*============ボディ部分開始============*/
#main_img{
background:url(../images/main_flash_bg.jpg) no-repeat;
width:821px;
height:305px;
margin:0;
padding:0;
}

A 回答 (1件)

こういう微妙な差、困りますよねえ。


原因は改行さんです。
div#header をこのようにしてみてください。

<div id="header"><img src="images/head.gif" width="821" height="161" border="0" usemap="#Map2" /><!--
--><map name="Map2" id="Map2"><!--
--><area shape="rect" coords="674,124,775,144" href="#" /><area shape="rect" coords="36,17,322,85" href="#" /><!--
--></map></div>

改行をコメントアウトしています。
改行をなくして一続きに書くのでもいいですが
こっちのほうが見栄えはましだと思います。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!