CSS IE6でのabsoluteズレ

このQ&Aのポイント
  • IE6でのフッターの表示がズレる問題を解決する方法を教えてください。
  • CSSのposition:absoluteを使用してフッターを下部に固定していますが、IE6で右にずれて表示されます。
  • 他のブラウザでは問題ありませんが、IE6での表示を修正する方法を教えてください。
回答を見る
  • ベストアンサー

CSS IE6でのabsoluteズレ

フッターがブラウザに合わせて下部に固定するようにしていて フッターは横幅100%にしています。 他のブラウザでは全く問題ありませんが、IE6で見ると右にかなりずれて表示されてしまいます。 以下HTMLソース-------------------------- <div id="footer"> <div class="foot"><a title="トップにもどる" href="#top"><img src="common/images/pagetop.gif" alt="ページTOP" /></a></div> </div> 以下CSSソース-------------------------- #footer{ position:absolute; bottom:0px; height:20px; width:100%; background-image: url(../images/footbg.gif); background-repeat: repeat-x; } #footer .foot{ margin-left: auto; margin-right: auto; width:950px; } #footer .foot img{ float: right; padding-top:1px; } position:absolute;をとると下固定ではなくなりますが、ちゃんと真ん中に表示されます。 改善策をご教授願います。 よろしくお願いいたします。

  • CSS
  • 回答数3
  • ありがとう数3

質問者が選んだベストアンサー

  • ベストアンサー
  • ORUKA1951
  • ベストアンサー率45% (5062/11036)
回答No.3

>left:-1px  問題はありませんが、他の標準ブラウザでずれてしまったら、ダメです。すくなくとも現状もっともウェブ標準に近いfirefoxなどで表示確認はしてください。  最初に html,body{ margin:0; padding:0; } を書いておいたら?  原因のひとつに、<div id=footer>が他の親コンテナブロックに含まれているということはありませんか?  IE6は、標準と異なり自身のサイズや位置を算出するとき、本来はpadding辺の内側を参照すべきところを間違えています。  1px程度のずれと言うことは、それが原因ではないかと・・

tax0123
質問者

お礼

補足回答ありがとうございます! Firefox等のブラウザでは確認済みです。とくに問題ありませんでした。 >最初に >html,body{ >margin:0; >padding:0; >} >を書いておいたら? こちらは最初から設定してあります。 >原因のひとつに、<div id=footer>が他の親コンテナブロックに含まれているということはありませんか? wrapperの中に含まれております。 <div id="wrapper"> <div id="header"></div> <div id="main"></div> <div id="footer"> <p><a title="トップにもどる" href="#top"><img src="common/images/pagetop_o.gif" alt="ページTOP" /></a></p> </div> </div> 上記のような感じです。 今回の件、修正版は見た目には問題ありませんが、やはり-1pxは無理やりなような気がして 腑に落ちない感じです。 完全に自分の力不足ですね…。。ご丁寧にありがとうございました。

その他の回答 (2)

  • ORUKA1951
  • ベストアンサー率45% (5062/11036)
回答No.2

<div id="footer"> <p><a title="トップにもどる" href="#top"><img src="common/images/pagetop.gif" alt="ページTOP" /></a></p> </div> #footer{ position:absolute; bottom:0;height:20px;width:100%; background: url(../images/footbg.gif) repeat-x; text-align:center;/* IE6対策 */ } #footer p{ margin-left: auto; margin-right: auto; width:950px; text-align:right; } で良いかと。CSS2では、出発点となるセレクタを書くのが基本です。単に.footじゃなくp.footとか、.footは*.footと解釈されます。また、div.footなんて余分なことは書かない。#footerの子供のpなら、#footer p{}でよい。

tax0123
質問者

お礼

ご回答とソースありがとうございます。 また、アドバイスの方もありがとうございました。 上記で試してみたのですが、やはりズレたままでした。。 なので#footerに left:-1px を追加したところ解消されました。 こちらで勝手に考えて追加したものなのですが、この記述で問題はないでしょうか。 #footer{ position:absolute; left:-1px; bottom:0;height:20px;width:100%; background: url(../images/footbg.gif) repeat-x; text-align:center;/* IE6対策 */ } #footer p{ margin-left: auto; margin-right: auto; width:950px; text-align:right; }

noname#158634
noname#158634
回答No.1

そりゃabsoluteだからねえ。 「absolute」っていう単語の意味知ってます? https://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=css+absolute+%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%AA%E3%83%B3%E3%82%B0&num=50

tax0123
質問者

お礼

ご回答ありがとうございます。 すみません。。解っていたつもりだったんですけど、力不足で。。。 ご丁寧にリンクありがとうございました。

関連するQ&A

  • 画像をずらしてhoverしたいのですがIE7では×

    一枚の画像をずらしてロールオーバーさせてナビをつくったのですが、IE7以外の全ブラウザではうまくいきますが、唯一IE7だけはうまくいきません。 5つのナビボタンのうち、左3つがポイントしても矢印と画像が変わりません。 ですが、それはトップページのナビだけの話で、他のページは普通にロールオーバーします。 ナビの部分はDreamweaverのテンプレートで編集不可能領域に含まれてますので、全ページのコードは同一です。 以下、コードです。 <!--HTML--> <body> <div id="container"> <div id="hedder"> <div id="toprogo"><a href="index.html"><img src="○○"/></a></div> <div id="main_image"><img src="○○"/></div> <div id="navi"> <div id="top"><a href="index.html"/></a></div> <div id="kodawari"><a href="particular.html" /></a></div> <div id="catalog"><a href="goods-catalog.html" /></a></div> <div id="from_producer"><a href="index.html" /></a></div> <div id="contact"><a href="mailto:" /></a></div> </div> </div> </div> </body> <!--ここからcss--> body { font-family:"MS ゴシック", "MS Gothic", "Osaka-等幅", Osaka-mono, monospace; color: #473906; background-color: #fafde1 ; } img { border: none; } a { color: #473906; text-decoration: none; } a:hover { color: #ff0000; } #container { width: 950px; margin: auto; } #hedder { widht: 950px; height: 380px; } #top_logo {margin-top: 10px; } #main_image { width: 950px; height: 300px; margin-top: 10px; } #navi { margin-top: 20px; /margin-top: 0 ; } #top a { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: 0px 0px; display: block; float: left; } #top a:hover { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: 0px -50px; display: block; float: left; } #kodawari a { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -190px 0px; display: block; float: left; } #kodawari a:hover { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -190px -50px; display: block; float: left; } #catalog a { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -380px 0px; display: block; float: left; } #catalog a:hover { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -380px -50px; display: block; float: left; } #from_producer a { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -570px 0px; display: block; float: left; } #from_producer a:hover { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -570px -50px; display: block; float: left; } #contact a { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -760px 0px; display: block; float: left; } #contact a:hover { width: 190px; height: 50px; margin-top: 30px; background-image: url(images/navi/navi.gif); background-repeat: no-repeat; background-position: -760px -50px; display: block; float: left; } つめて見にくくなっていますが、お願いいたします。

    • ベストアンサー
    • CSS
  • ieでの微妙な隙間(CSS)

    以下のソースでhtmlを表示するとie6でpage_topとfooterの間に 3~5pxほどの隙間が開いてしまいます。 しかしfirefoxで表示すると隙間なく表示されます。 特にmarginなど指定していないので何が原因なのかが全くわかりません。 どのようにしたらie6でも隙間なく表示できるようになるでしょうか? 以下ソースの抜粋です。宜しくお願いします。 //CSS #page_top { clear: both; width: 900px; height: 24px; margin: 0 auto; padding: 0; background: #fff; text-align: right; } #footer { width: 900px; margin: 0 auto; padding: 10px 0 5px 0; background: #fff url(img/footer_bg.gif) repeat-x; text-align: center; } //html <div id="page_top"> <a href="#top"> <img src="img/btn.gif" alt="ボタン" width="114" height="24" /> </a> </div> <div id="footer"> あいうえおかきくけこさしすせそ・・・ </div>

  • CSSについて教えて下さい

    ホームページビルダーでの経験しかない初心者です。CSSに挑戦していますが不明な点ばかりです。 無料テンプレートを加工していますが下記の内容を教えて頂けませんか。 topとtop2の左側(上下位置は中間)に私が追加したtop3の画像を 表示させたいのですがうまくできません。宜しくお願いいたします。 CSS #bodyid{ background:#eafefe url('img/bg.png'); padding:0; margin:0; text-align:center; } #bg{ width:706px; background:#fff; margin:0 auo; } #top{ width:400px; height:80px; background:url('img/title1.gif') no-repeat center top; text-align:left; } #top2{ width:400px; height:60px; background:url('img/title2.gif') no-repeat center top; text-align:left; } #top3{ position:absolute; left 120px; top 30px; width:100px; height:80px; background:url('img/image555.gif') no-repeat center top; } html <body id="bodyid"> <DIV id="bg"> <div id="top"></div> <div id="top3"></div> <div id="top2"></div>

  • positionプロパティの設定について

    下記のようなposition: relative;の指定widthが100%に対して、position: absolute;を指定するdiv#innerのwidthが800pxでセンター表示されるように指定したいのですが、position: absolute;のtop: 0px; left: 0px;と記述すると当然のごとく左寄りに表示されます。 div#inner部分をpositionプロパティを使いセンター表示される記述方法があればご教授下さい。 なお、positionプロパティを使う方法のみのご回答でお願いします。 ----------------------------------------- div#footer { position: relative; width: 100%; height: 250px; margin: 0; padding: 0; background : url(images/footer_bg.gif) repeat-x 0 0; } div#inner { position: absolute; top: 0px; left: ?px; width: 800px; margin: 0px auto 0px auto; } -----------------------------------------

    • ベストアンサー
    • HTML
  • IE6でナビ下に隙間ができてしまいます。

    横並びのナビの下に隙間無く内容を入れたいのですが、IE6だとナビ下に2ミリ位の隙間ができてしまいます。 いろいろ調べてIE6対策でline-height: 0・margin: 0を追加してもうまくいきません。 何が間違っているのか、ご支持お願いします。 <body> <div id="wrapper"> <div id="headnavi"> <ul> <li id="A"><a href=""><span>A</span></a></li> <li id="B"><a href=""><span>B</span></a></li> <li id="C"><a href=""><span>C</span></a></li> <li id="D"><a href=""><span>D</span></a></li> <li id="E"><a href=""><span>E</span></a></li> <li id="F"><a href=""><span>F</span></a></li> </ul> </div><!-- / #headnavi --> <div id="pro_back"> <p>○○○○○</p> </div><!-- / #pro_back --> </div><!-- / #wrapper --> </body> </html> *{ margin: 0px; padding: 0px; font-weight: normal; list-style-type:none; } body { width: 100%; font-size: 75%; font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif; line-height: 180%; color: #333; } #wrapper { position: relative; width: 960px; margin-left:auto; margin-right:auto; } #pro_back { width: 960px; height: 623px; background-image: url(images/pro_back.gif); background-repeat: no-repeat; margin: 0; } #headnavi { width:960px; height: 33px; margin: 0; } #headnavi ul { line-height: 0; margin: 0; } #headnavi ul li a { display: block; width: 172px; text-decoration: none; height: 33px; } #headnavi ul li a span { position: absolute; width: 0; height: 0; padding: 0; overflow: hidden; } ul li#A a { position: absolute; left: 890px; top: 0px; background-repeat: no-repeat; background-position: 0 0; background-image: url(images/topbotan.gif); margin: 0; } ul li#B a { position: absolute; left: 632px; top: 0px; background-repeat: no-repeat; background-position: 0 0; background-image: url(images/link.gif); margin: 0; } ul li#C a { position: absolute; left: 474px; top: 0px; background-repeat: no-repeat; background-image: url(images/mail.gif); margin: 0; } ul li#D a { position: absolute; left: 316px; top: 0; background-repeat: no-repeat; background-image: url(images/illustration.gif); margin: 0; } ul li#E a { position: absolute; left: 158px; top: 0; background-repeat: no-repeat; background-image: url(images/designwork.gif); margin: 0; } ul li#F a { position: absolute; left: 0px; top: 0; background-position: 0 0; background-repeat: no-repeat; background-image: url(images/profile.gif); margin: 0; }

    • 締切済み
    • CSS
  • IE6にてliタグに対してposition:absolute;を使ったときのバグについて

    すみません、質問させて下さい。 下記のソースとスタイルシートでIE6の場合だけliが原因と思われる余白ができます。他のモダンブラウザ、IE7以降ではhrの部分を除いて問題ありませんでした。余白をなくす方法はないでしょうか。 ソース <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link href="test.css" type="text/css" rel="stylesheet"> <title>test</title> </head> <body> <div id="wrapper"> <div id="header"> <h1>test</h1> </div> <div id="contents"> <div id="lefty"> <p>test test test (略)</p> </div> <div id="righty"> <p>test test test (略)</p> </div> </div> <hr> <div id="navi"> <ul> <li id="list01"><a href="#">赤</a></li> <li id="list02"><a href="#">青</a></li> </ul> </div> <div id="footer"> <address>copyright.</address> </div> </div> </body> </html> スタイルシート @charset "shift_JIS"; * { margin: 0; padding: 0; } body { text-align: center; } #wrapper { margin: 0 auto; width: 760px; position: relative; text-align: left; } #header { width: 760px; height: 100px; background-color: #CC9900; } #contents { width: 760px; } #lefty { width: 380px; float: left; background-color: #CCC; } #righty { width: 380px; float: right; color: #FFF; background: #000 } #list01 a { display: block; width: 180px; padding: 30px 0 0 0; overflow: hidden; background: url(images/nav01.gif) no-repeat; height: 0px !important; height/**/: 30px; position: absolute; top: 30px; right: 0; } #list02 a { display: block; width: 180px; padding: 30px 0 0 0; overflow: hidden; background: url(images/nav02.gif) no-repeat; height: 0px !important; height/**/: 30px; position: absolute; top: 60px; right: 0; } #list01 a:hover { display: block; width: 180px; padding: 30px 0 0 0; overflow: hidden; background: url(images/nav01_on.gif) no-repeat; height: 0px !important; height/**/: 30px; position: absolute; top: 30px; right: 0; } #list02 a:hover { display: block; width: 180px; padding: 30px 0 0 0; overflow: hidden; background: url(images/nav02_on.gif) no-repeat; height: 0px !important; height/**/: 30px; position: absolute; top: 60px; right: 0; } #footer { clear: both; padding-top: 30px; width: 760px; background-color: #990033; } li { list-style-type: none; } a { text-decoration: none; } hr { clear: both; width: 0; } どなたかご教授ください、よろしくお願いします。

    • ベストアンサー
    • HTML
  • firefoxでfloatの調整の仕方CSS

    CSSで下記(div)のなかにBOXを3つ並べました、 ie6以上では思い通りに表示されるのですがFireFox(バージョン3.5.3)では一番右端にくるBOXが左端のBOXの下に入ってしまいます。 どなたか解決策を教えていただけますでしょうか? ----ソース部分--- <div class="setbox1"> <div id="rent1"><a href="eee.html"><img src="img/trans_rent.gif" width="234" height="69" /></a></div> <div id="rent2"><a href="aaa.html"><img src="img/trans_rent.gif" width="234" height="69" /></a></div> <div id="rent3"><a href="ccc.html"><img src="img/trans_rent.gif" width="234" height="69" /></a></div> </div> ----以下CSS---- .setbox1{ margin-left : 25px; width : 750px; } #rent1{ margin-top : 20px; margin-left : 0px; float : left; width : 234px; } #rent1 a{ background-image : url(img/rent1.gif); display : block; line-height : 0px; background-repeat : no-repeat; width : 234px; height : 69px; } #rent1 a:hover{ background-position : left bottom; } #rent1 img{border-width : 0px 0px 0px 0px; } #rent2{ margin-left : 0px; float : left; margin-right : 22px; padding-left : 22px; width : 234px; margin-top : 20px; } #rent2 a{ background-image : url(img/rent2.gif); display : block; background-repeat : no-repeat; line-height : 0px; width : 234px; height : 69px; } #rent2 a:hover{ background-position : left bottom; } #rent2 img{border-width : 0px 0px 0px 0px; } #rent3{ margin-top : 20px; margin-left : 0px; padding-left : 0px; } #rent3 a{ background-image : url(img/rent3.gif); line-height : 0px; background-repeat : no-repeat; width : 234px; height : 69px; display : block; } #rent3 a:hover{ background-position : left bottom; } #rent3 img{border-width : 0px 0px 0px 0px; }

  • CSSのpositionでフッターが最下に配置されてくれない

    CSSの配置がどうにもうまくいきません。 フッターをWebページの最下に配置したいのですが、どうしてもWindowsIE7だと中央くらいの場所にきてしまいます。どうやったら治りますでしょうか? WindowsのIE6やFirefoxではOKなんですが・・・・・ 以下、ソースです。 ●CSS ------------------------------------------------------ div#hdr-wrap { position:absolute; background:url(../img/cmn/hdr_bg.gif) repeat-x; top:0px; width:100%; height:120px; text-align:center; } div#hdr { width:900px; _width: 902px;/*IE対策*/ height:120px; margin-left: auto; margin-right: auto; text-align: left; } div#hdr-vi{ padding-top:71px; padding-left:0px; } div#gbnavi-wrap { position: absolute; background:url(../img/cmn/gbnv_bg.gif) repeat-x; top: 120px; width:100%; height: 51px; text-align:center; } div#gbnavi { width: 900px; _width: 902px;/*IE対策*/ top: 120px; height: 51px; margin-left: auto; margin-right: auto; text-align: left; } div#main-wrap{ position: absolute; top:171px; width:100%; height:100%; background: url(../img/cmn/bg_cts_sdw.gif) repeat-x; text-align:center; } div#main{ position: static; padding-top:0px; width: 900px; _width: 902px;/*IE対策*/ height:100%; margin-left: auto; margin-right: auto; text-align: left; } div#ftr-wrap { clear: both; background:url(../img/cmn/ftr_bg.gif) repeat-x; width:100%; height:151px; text-align:center; } div#footer{ clear: both; color: #415880; width: 900px; _width: 902px;/*IE対策*/ height:151px; margin-left: auto; margin-right: auto; text-align: left; } ------------------------------------------------------ ●以下、HTMLソースです ------------------------------------------------------ <div id="hdr-wrap"> <div id="hdr"> <div id="hdr-vi">コンテンツ入る</div> </div> </div> <div id="gbnavi-wrap"> <div id="gbnavi"> <ul> <li>コンテンツ入る</li> </ul> </div> </div> <div id="main-wrap"> <div id="main"> <!--RIGHT AREA--> <div id="right">コンテンツ入る</div> <!--/RIGHT AREA--> <!--LEFT AREA-->     コンテンツ入る。サイドバーが。 <!--/LEFT AREA--> <!--/MAIN AREA--> <!--/MIDDLE AREA--> </div> <!--FOOTER AREA--> <div id="ftr-wrap">コンテンツ入る</div> <!--/FOOTER AREA--> </div> ------------------------------------------------------ なぜかIE7だけ、ftr-wrapというフッターエリアの一番外側のDIVから中身が全部画面の中央あたりにあたかもレイヤーで上にのっているがごとく、ミドルエリアのコンテンツの上に乗っかるかたちで配置されてしまいます。 宜しくお願いいたします。

  • CSSでIE6だけ出る隙間をなくしたい

    お世話になります。 CSSとtableを組み合わせてレイアウトをしています。 WindowsのIE7やSafari、Netscapeでは正常に表示されるのですが、 IE6では<div>と<div>の間に1、2pxの白い隙間が出てしまいます。 htmlは下記にアップしています。 http://www.couleurcafe.jp/08/ ホーム、メニューといったメインメニューの行と、 赤地に白文字のヘッダーメニューの行の間に隙間が出てしまいます。 CSSは以下の通りです。 @charset "Shift_JIS"; body { margin: 0; padding: 0; background-image: url(img/bodybg.gif); } #wrapper { width: 780px; margin-right: auto; margin-left: auto; margin-top: 0px; margin-bottom: 0px; text-align: left; background-color: #FFFFFF; } #mainmenu { background-image: url(img/menubarbg.gif); background-repeat: repeat-x; width: 766px; height:29px; margin-left: 14px; margin-bottom:0px; padding-top:1px; } #menublock { background-image: url(img/menubg.gif); background-repeat: no-repeat; width: 88px; height:29px; font-size: 12px; color: #000000; text-align: center; height: 16px; padding-top: 12px; } #menublock_over { background-image: url(img/menubg_over.gif); background-repeat: no-repeat; width: 88px; height:29px; font-size: 12px; color: #FFFFFF; text-align: center; height: 20px; padding-top: 8px; } #headermenu { background-color: #E10C0A; width: 772px; height: 12px; font-size: 11px; color: #FFFFFF; text-align: right; padding: 4px; } この隙間をなくす方法はないでしょうか。 CSSのおかしいところがあればご指摘をお願いいたします。 どうぞよろしくお願いいたします。

    • ベストアンサー
    • HTML
  • 本当に困っています。html/cssについて。

    html/cssについて。画像が表示されません。 html/cssを手打ちしてコーディングしています。 一部の画像がどうしても表示されず、困っています。 まず、背景画像はJavaScriptで5枚の画像からランダムで表示。 次に帯状のヘッダ画像(top_header.gif)を最上部に横方向にリピートして表示。 同じくフッダ画像(top_footer.gif)を最下部に横方向にリピートして表示。 そして左上にホームボタン画像(TOP_s1.gif)を配置。 次が問題になっている箇所です。 ボタン画像(button_r1_c1_s1.gif[width 136px heignt 36px])を上から0px,右から500pxの位置 に、ブラウザの大きさに関わらず常に表示される(fixed)ようにしたいのですが、 画像が表示されなくなります。ちなみに透明のままですが、ブラウザで確認するとタブの遷移はできます。 これもちなみにですが、上から0px,右からも0pxの位置に指定すると表示されます。 右から0pxだと表示されるが、それ以外だと表示されません。他の画像が邪魔しているのなのか、原因がわかりません。 同様にフッダ画像(top_footer.gif[width 1681px height 42px])も表示されていません。 これはheightを1000pxくらいで指定すれば、なぜか表示されるのですが、邪道な気がしています。 どなたかボタン画像(button_r1_c1_s1.gif)とフッダ画像(top_footer.gif)の表示方法をご指導願います。 よろしくお願いします。 【html】 <body> <SCRIPT language="JavaScript"> bgc = new Array(); bgc[0] = "url(../image/bg1.jpg)"; bgc[1] = "url(../image/bg2.jpg)"; bgc[2] = "url(../image/bg3.jpg)"; bgc[3] = "url(../image/bg4.jpg)"; bgc[4] = "url(../image/bg5.jpg)"; n = Math.floor(Math.random()*bgc.length); document.body.style.backgroundImage = bgc[n] </SCRIPT> <div id="container"> <div id="top_header"></div> <div id="top_footer"></div> <div id="TOP_s1"><a href="#"></a></div> <div id="News"><a href="#"></a></div> </div> </body> 【CSS】 @charset "utf-8"; /* CSS Document */ body{ padding-top: 0; padding-right: 0; padding-left: 0; margin-top: 0; margin-right: 0; margin-left: 0; overflow-y: hidden; overflow-x: hidden; } #container{ height:100%; width:100%; } #top_header{ background-image: url("../image/top_header.gif"); height: 34px; background-position: left top; background-repeat: repeat-x; background-attachment: scroll; z-index: 1; } #top_footer{ <!-- 問題箇所2 --> background-image: url("../image/top_footer.gif"); height: 42px; <!-- 1000pxくらに表示すると表示される --> bottom: 0; background-position: left bottom; background-repeat: repeat-x; background-attachment:fixed; z-index: 2; } #TOP_s1 a { background-image: url("../image/TOP_s1.gif"); height: 194px; width:332px; background-position: left top; background-repeat:no-repeat; background-attachment: scroll; position:absolute; z-index: 3; top:0; left: 0; } #TOP_s1 a:hover { background-image: url("../image/TOP_s2.gif"); } #News a { <!-- 問題箇所1 --> background-image: url("../image/button_r1_c1_s1.gif"); height: 136px; width:36px; background-position: right top; background-repeat:no-repeat; background-attachment: fixed; position:absolute; z-index: 3; top:0px; right: 500px; <!-- 500pxを0にすればなぜか表示されます --> }

    • ベストアンサー
    • CSS

専門家に質問してみよう