• ベストアンサー

全体的に左に配置されている

自分のFC2ブログを解像度の高いワイド画面のパソコンで表示させてみたところ、全体が左に配置され、右半分が真っ白となっていました。 どうすれば真ん中に表示されるでしょうか? スタイルシートの一部はこう↓なっています。 body { width: 100%; color: #333; font-size: 100%; font-family: sans-serif; } h1#logoType { font-family: Helvetica, Arial, sans-serif; font-size: 41px; letter-spacing: 1px; line-height: 1.3; position: absolute; left: 140px; top: 50px; } .intro{ font-size: 16px; letter-spacing: 2px; line-height: 1.3; position: absolute; left: 135px; top: 105px; color:#81aacf;} #primary {float: left; width: 600px; padding: 190px 0 0 120px; }

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

  • ベストアンサー
  • monoiro
  • ベストアンサー率100% (2/2)
回答No.1

スタイルシートを見ただけでは良くわかりませんが 解像度に関係なく、DIV等のブロック要素を真ん中に寄せたい場合 margin-left: auto; margin-right: auto; とCSSに追加すれば良いんですが、IEの事も考えtext-aligin:center;を親要素(恐らくbodyでも良い)に入れてあげればIEでも中央寄せされる……はず。 何か勘違いしてたらすみません。 あと#primaryのfloat:leftが少し気になりますが……。

参考URL:
http://www.mozilla.gr.jp/standards/webtips0004.html
checkitout
質問者

お礼

御礼が遅くなって申し訳ありません<(_ _)> 大変参考になりました。 まだ万事解決とまではいっていませんが、教えていただいたことをヒントに頑張ってみます。 本当にありがとうございました!

その他の回答 (1)

  • dino18
  • ベストアンサー率54% (28/51)
回答No.2

bodyにtext-align: center;を追加 body直下のdiv属性にmargin: 0 auto;を追加させると真中に表示されます。

checkitout
質問者

お礼

教えていただいたモノをCSSに追加してみて、左寄せから中央に表示されるようになりました! ただそのことで全体的なバランスが崩れてしまいましたが、これから調整をしていきたいと思います。 回答ありがとうございました!<(_ _)>

関連するQ&A

  • CSSファイル内のバグの原因

    あるサイトのリニューアル中リンクバナーに指定したレイアウト用のCSSが急に機能しなくなり、原因がわかりません。同じCSSファイルを使用したページで共通したバグがj生じるのでCSSファイルが原因と思いチェックしたのですが、自分では原因を突き止められずにいます。サイトは、 http://www.vesta.dti.ne.jp にアップロードしています。問題のCSSファイルの対象と思われるソースをコピーしました。宜しくお願いいたします。バグの原因になる要素でご存知のものがあれば教えて下さい。 body{font-family: Arial,sans-serif;color: #333333;line-height: 1.166;margin: 0px;padding: 0px;background: #cccccc;background-color: #cccccc;} a:link, a:visited{color: #005FA9;text-decoration: none;} a:hover{text-decoration: underline;} h1{ font: bold 120% Arial,sans-serif;color: #334d55;margin: 0px; padding: 0px;} h2{font: bold 120% Arial,sans-serif;color: #006699;margin: 0px; padding: 0px;} h3{font: bold 100% Arial,sans-serif;color: #334d55;margin: 0px;padding: 0px;} h4{ font: 100% Arial,sans-serif;color: #333333;margin: 0px;padding: 0px;} h5{font: 100% Arial,sans-serif; color: #334d55;margin: 0px;padding: 0px;} form {margin: 0;padding: 0;}label{ font: bold 1em Arial,sans-serif;color: #334d55;}input{font-family: Arial,sans-serif;} #pagecell1{position:absolute;top: 112px;left: 2%;right:2%;width:85.6%;background-color: #ffffff;} #tl {position:absolute;top: -1px;left: -1px;margin: 0px;padding: 0px;z-index: 100;} #tr {position:absolute;top: -1px;right: -1px;margin: 0px;padding: 0px;z-index: 100;} #masthead{position: absolute;top: 0px;left: 2%;right: 2%;width:85.6%;} #pageNav{float: right;width:190px;padding: 0px;background-color: #f5f7f7;border-left: 1px solid #cccccc;border-bottom: 1px solid #cccccc;font: small Verdana,sans-serif;} #content{padding: 0px 10px 0px 0px;margin:0px 190px 0px 0px; border-right: 1px solid #ccd2d2;} #siteName{margin: 0px;padding: 16px 0px 8px 0px;color: #ffffff;font-weight: normal;} #utility{font: 75% Verdana,sans-serif;position: absolute;top: 16px;right: 0px;color: #919999;} #utility a{color: #ffffff;} #utility a:hover{text-decoration: underline;} #pageName{padding: 0px 0px 14px 10px;margin: 0px;border-bottom:1px solid #ccd2d2;} #pageName h2{font: bold 165% "MS P明朝", "細明朝体", "ヒラギノ明朝 Pro W3";color: #336633;margin:0px;padding: 0px;} #pageName img{position: absolute;top: 0px;right: 6px;padding: 0px;margin: 0px;} #globalNav{position: relative;width: 100%;min-width: 640px;height: 32px;color: #cccccc;padding: 0px;margin: 0px;background-image:url(../commonimg/glbnav_background.gif);} #globalNav img{margin-bottom: -4px;} #gnl {position: absolute;top: 0px;left:0px;} #gnr {position: absolute;top: 0px;right:0px;} #globalLink{position: absolute;top: 6px;height: 22px;min-width: 640px;padding: 0px;margin: 0px;left: 10px;z-index: 100;} a.glink, a.glink:visited{font-size: small;color: #666666;font-weight: bold;margin: 0px;padding: 2px 5px 4px 5px;border-right: 1px solid #8FB8BC;} a.glink:hover{background-image:url(../commonimg/glblnav_selected.gif);text-decoration: none;} .skipLinks {display: none;} .subglobalNav{position: absolute;top: 84px;left: 0px;/*width: 100%;*/min-width: 640px;height: 20px;padding: 0px 0px 0px 10px;visibility: hidden;color: #ffffff;} .subglobalNav a:link, .subglobalNav a:visited{ font-size: 80%;color: #ffffcc;} .subglobalNav a:hover{color: #ffffcc;} #search{position: absolute;top: 5px;right: 10px;z-index: 101;} #search input{font-size: 70%;margin: 0px 0px 0px 10px; } #search a:link, #search a:visited {font-size: 80%;font-weight: bold;} #search a:hover{margin: 0px;}

  • CSSファイル内のバグの原因

    あるサイトのリニューアル中リンクバナーに指定したレイアウト用のCSSが急に機能しなくなり、原因がわかりません。同じCSSファイルを使用したページで共通したバグがj生じるのでCSSファイルが原因と思いチェックしたのですが、自分では原因を突き止められずにいます。サイトは、 ​http://www.vesta.dti.ne.jp​ にアップロードしています。問題のCSSファイルの対象と思われるソースをコピーしました。宜しくお願いいたします。バグの原因になる要素でご存知のものがあれば教えて下さい。 body{font-family: Arial,sans-serif;color: #333333;line-height: 1.166;margin: 0px;padding: 0px;background: #cccccc;background-color: #cccccc;} a:link, a:visited{color: #005FA9;text-decoration: none;} a:hover{text-decoration: underline;} h1{ font: bold 120% Arial,sans-serif;color: #334d55;margin: 0px; padding: 0px;} h2{font: bold 120% Arial,sans-serif;color: #006699;margin: 0px; padding: 0px;} h3{font: bold 100% Arial,sans-serif;color: #334d55;margin: 0px;padding: 0px;} h4{ font: 100% Arial,sans-serif;color: #333333;margin: 0px;padding: 0px;} h5{font: 100% Arial,sans-serif; color: #334d55;margin: 0px;padding: 0px;} form {margin: 0;padding: 0;}label{ font: bold 1em Arial,sans-serif;color: #334d55;}input{font-family: Arial,sans-serif;} #pagecell1{position:absolute;top: 112px;left: 2%;right:2%;width:85.6%;background-color: #ffffff;} #tl {position:absolute;top: -1px;left: -1px;margin: 0px;padding: 0px;z-index: 100;} #tr {position:absolute;top: -1px;right: -1px;margin: 0px;padding: 0px;z-index: 100;} #masthead{position: absolute;top: 0px;left: 2%;right: 2%;width:85.6%;} #pageNav{float: right;width:190px;padding: 0px;background-color: #f5f7f7;border-left: 1px solid #cccccc;border-bottom: 1px solid #cccccc;font: small Verdana,sans-serif;} #content{padding: 0px 10px 0px 0px;margin:0px 190px 0px 0px; border-right: 1px solid #ccd2d2;} #siteName{margin: 0px;padding: 16px 0px 8px 0px;color: #ffffff;font-weight: normal;} #utility{font: 75% Verdana,sans-serif;position: absolute;top: 16px;right: 0px;color: #919999;} #utility a{color: #ffffff;} #utility a:hover{text-decoration: underline;} #pageName{padding: 0px 0px 14px 10px;margin: 0px;border-bottom:1px solid #ccd2d2;} #pageName h2{font: bold 165% "MS P明朝", "細明朝体", "ヒラギノ明朝 Pro W3";color: #336633;margin:0px;padding: 0px;} #pageName img{position: absolute;top: 0px;right: 6px;padding: 0px;margin: 0px;} #globalNav{position: relative;width: 100%;min-width: 640px;height: 32px;color: #cccccc;padding: 0px;margin: 0px;background-image:url(../commonimg/glbnav_background.gif);} #globalNav img{margin-bottom: -4px;} #gnl {position: absolute;top: 0px;left:0px;} #gnr {position: absolute;top: 0px;right:0px;} #globalLink{position: absolute;top: 6px;height: 22px;min-width: 640px;padding: 0px;margin: 0px;left: 10px;z-index: 100;} a.glink, a.glink:visited{font-size: small;color: #666666;font-weight: bold;margin: 0px;padding: 2px 5px 4px 5px;border-right: 1px solid #8FB8BC;} a.glink:hover{background-image:url(../commonimg/glblnav_selected.gif);text-decoration: none;} .skipLinks {display: none;} .subglobalNav{position: absolute;top: 84px;left: 0px;/*width: 100%;*/min-width: 640px;height: 20px;padding: 0px 0px 0px 10px;visibility: hidden;color: #ffffff;} .subglobalNav a:link, .subglobalNav a:visited{ font-size: 80%;color: #ffffcc;} .subglobalNav a:hover{color: #ffffcc;} #search{position: absolute;top: 5px;right: 10px;z-index: 101;} #search input{font-size: 70%;margin: 0px 0px 0px 10px; } #search a:link, #search a:visited {font-size: 80%;font-weight: bold;} #search a:hover{margin: 0px;}

  • タグの修正に力をかしてください

    ホットペッパーに出てくるお店のページのバナーのように、 「アクセス」「TEL」の文字を表示させたいのですがうまくいきません。 タグの修正にちからをかしていただけないでしょうか。 以下、タグです。よろしくおねがいします。 <table width="702" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="color3" colspan="3"><img src="images/spacer.gif" alt="" width="1" height="1"></td> </tr> <tr> <td class="color3"><img src="images/spacer.gif" alt="" width="1" height="1"></td> <div style="position:relative;"><img src="images/hotpot_bannar.gif" alt="バナー" width="700" height="151"></div> <div style="position:absolute; top:70px; left:400px; color:#ffffff; font-size:10px; border:solid 1px; padding:2px;">アクセス</div> <div style="position:absolute; top:50px; left:450px; color:#ffffff; font-size:10px;>JR環状線:「福島駅」・・・</div> <div style="position:absolute; top:70px; left:450px; color:#ffffff; font-size:10px;>JR東西線:「新福島駅」・・・</div> <div style="position:absolute; top:120px; left:400px; color:#ffffff; font-size:10px; border:solid 1px; padding:2px;">TEL</div> <div style="position:absolute; top:120px; left:450px; color:#ffffff; font-size:10px;>06-****-****</div> <td class="color3"><img src="images/spacer.gif" alt="" width="1" height="1"></td> </tr> </table>

    • ベストアンサー
    • HTML
  • HP全体を左寄せ配置するCSSの記述について。

    HP全体を左寄せ配置するCSSの記述について。 CSS付きで中央表示の無料テンプレートを頂きました。 これを左寄せ配置で表示させる方法を教えて下さい。 (base.css) @charset "Shift_JIS"; /* 基本設定 */ *{ margin:0px; padding:0px; font-size:12px; font-family:Verdana, Helvetica, sans-serif; } body{ color:#333; text-align:center; } br{ letter-spacing:normal; } a{ color:#333;text-decoration:none; } a:hover{ color:#fff;text-decoration:none; } img{ border:0px; } /* テンプレート */ #temp{ width:500px;  text-align:center;  line-height:18px; letter-spacing:1px; margin:10px auto; } #header{ background:#fff url(img/cat.gif) no-repeat 0px 0px; width:500px;height:120px; text-align:left; border:1px solid #333; } #menu{ background-color:#333; width:500px;height:24px; color:#fff; margin:10px 0px; border:1px solid #333; } #main{ background:#fff; width:480px; text-align:left; padding:10px; border:1px solid #333; } #footer{ background:#fff; width:500px;height:30px; color:#333; line-height:30px; margin:10px 0px; border:1px solid #333; } /* タイトル部分 */ #header h1{ padding:30px 0px 0px 190px; } /* メニュー部分 */ #menu ul{ list-style-type:none; height:24px; margin-left:30px; } #menu li{ display:inline; padding:0px } #menu a{ color:#fff; line-height:24px; float:left; text-decoration:none; padding:0px 5px; } #menu a:hover{ color:#DB9400; text-decoration:none; } /* メインコンテンツの見出し */ #main h2{ background:url("img/mark.gif") no-repeat; padding:1px 0px 3px 25px; color:#DB9400; よろしくお願いします。

    • ベストアンサー
    • HTML
  • fc2ブログのスタイルシートについて

    h1~h6タグの文字の大きさ&改行(しない)を変更したいのですが、 fc2ブログのスタイルシートのどこに書き込めばいいのか分からない状態です。 色々調べてみたのですが、どうしても分からないので、分かる方がいましたら、教えて下さい。 よろしくお願いします。 ソースは、こちらになります。 (文字数が足りないので数ヵ所省きました)↓ body{ font-family: "Verdana","MS Pゴシック", "MS UI Gothic","Arial","Osaka"; margin:0px; margin-left:auto; margin-rught:auto; padding:0px; background-color: #FFFFFF; color:#666666; text-align:center; letter-spacing:1px; word-break: break-all; } #container{ width:840px; margin-right:auto; margin-left:auto; padding:0px 0px; background-color: #FFFFFF; border-left:1px solid #DECE21; border-right:1px solid #DECE21; } /* ### 共通のタグ ### */ blockquote{ font-family: "MS UI Gothic","Verdana","MS Pゴシック", "Arial","Osaka"; margin:15px 0px; padding:10px; background-color:; border:1px dashed #996600; font-size:12px; line-height:150%; width:90%; voice-family:"\"}\""; voice-family:inherit; width:90%; } html>body blockquote{ width:90%; } blockquote p{ margin:0px 0px; padding:0px; line-height:150%; } h1.blogtitle{ position:absolute; width:820px; font-family: "Century Gothic","MS UI Gothic","MS Pゴシック", "Arial","Osaka"; padding:0px; margin:0px; top:3px; left:20px; color:#333333; font-size:24px; font-weight:normal; z-index:1; } h1.blogtitle_back{ position:absolute; width:818px; font-family: "Century Gothic","MS UI Gothic","MS Pゴシック", "Arial","Osaka"; padding:0px; margin:0px 0px 0px 1px; top:4px; left:21px; color : #CCCCCC; font-size:24px; font-weight:normal; z-index:0; } /* ### メイン部(左側) ### */ #main{ width:590px; float:left; margin:0px; padding:0px; } #contents{ margin:0px 20px 0px 20px; padding:0px; text-align:left; width:590px; voice-family:"\"}\""; voice-family:inherit; width:550px; } html>body #contents{ width:550px; } /* ### エントリー(記事) ### */ .e_title{ font-family: "MS UI Gothic", "Verdana","MS Pゴシック", "Arial","Osaka"; height:20px; text-indent:60px; margin: 0px 0px 0px 0px; padding: 10px 0px 0px 0px; color:#967B3F; font-size:14px; font-weight:bold; letter-spacing:1px; } .e_date{ font-family: "Verdana","MS Pゴシック", "MS UI Gothic", "Arial","Osaka"; margin:0px 0px 30px 60px; text-align:left; color:#999999; font-size:10px; line-height:150%; letter-spacing:1px; } .e_body{ font-family: "MS UI Gothic","Verdana","MS Pゴシック", "Arial","Osaka"; margin:0px 0px 15px 0px; margin-bottom:25px; padding:0px ; color:#444444; font-size:12px; line-height:155%; letter-spacing:1px; } .e_body img, .e_body a img{ margin:2px; border:0px; } .e_body_w{ margin:0px; padding:5px 15px 5px 15px; background-attachment: scroll; background-image: url(http://blog-imgs-41.fc2.com/a/w/i/awitchsally/aws_np03_point.gif); background-repeat: no-repeat; background-position: 0% 0%; border:1px solid #E9F3E9; } .e_more{ margin:30px 0px 15px 0px; padding:0px; text-align:left; color:#333333; font-size:10px; font-weight:bold; letter-spacing:1px; } .e_state{ font-family: "Verdana","MS Pゴシック","MS UI Gothic", "Arial","Osaka"; margin:5px 0px; text-align:left; color#967B3F; font-size:10px; letter-spacing:1px; line-height:150%; font-weight:bold; }

    • ベストアンサー
    • HTML
  • float: leftで横に並べたら、サファリだけ

    float: leftで横に並べたら、サファリだけ隙間が空いてしまいます。 IEやファイヤーフォックスではピッタリ表示できています。 問題の箇所は以下です。 <div style="float: left;"> <p style="position: relative;"> <img src="./img/img-001.png" width="240" height="150" /> <br /> <span style="font-size: 12px; padding: 2px 5px 2px 5px; position: absolute; top: 130px; left: 0px; width: 230px; height: 16px; color: white ; background-color: black; opacity: 0.6;">テストテスト1</span> </p> </div> <div style="float: left;"> <p style="position: relative;"> <img src="./img/img-002.png" width="240" height="150" /> <br /> <span style="font-size: 12px; padding: 2px 5px 2px 5px; position: absolute; top: 130px; left: 0px; width: 230px; height: 16px; color: white ; background-color: black; opacity: 0.6;">テストテスト2</span> </p> </div> <div style="float: left;"> <p style="position: relative;"> <img src="./img/img-003.png" width="240" height="150" /> <br /> <span style="font-size: 12px; padding: 2px 5px 2px 5px; position: absolute; top: 130px; left: 0px; width: 230px; height: 16px; color: white ; background-color: black; opacity: 0.6;">テストテスト3</span> </p> </div> どうすればサファリの隙間を消せるでしょうか?

    • ベストアンサー
    • HTML
  • CSSのpositonでフッタを下部に固定したのですがIE6でズレてしまう原因が分からないので教えてください

    こんばんは、CSSのpositionで下部にフッタを固定する為に設定したらwinIE6で見るとフッタだけ右にずれてしまいます。 当方Mac、osXで主にドリームウィーバーに手打ちです。safari、frefoxではずれませんでした。ソースを省略すると原因が分からないのでCSSを全部載せます。 アドバイスいただけると大変うれしいです。お願いいたします。 html,body{ text-align:center; margin: 0px; background:#FFFFFF; height:100%; } #countainer{ position: relative; height: 100%; min-height:100%; } #contents { padding-bottom:50px; } #header{ height:106px; background-image: url(img/headbg.gif); background-repeat: repeat-x; } #logo { width: 800px; height: 96px; text-align: left; padding: 10px 0 0 0; margin: auto; background-image: url(img/bg_navi.gif); background-repeat: no-repeat; background-position: 100% 100%; } #logo img{ float: left; } #navi{ width: 600px; float: right; } #navi ul{ margin:75px 11px 0 0; padding:0; } #navi li{ width: 100px; height: 21px; float: right; margin:0; padding:0; list-style-type:none; text-align: center; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; line-height: 100%; background-image: url(img/bg_navi.gif); background-repeat: no-repeat; background-position: 0% 100%; } #navi a:link,#navi a:visited{ color:#635142; padding: 0 0 0 12px; } #navi a:hover{ color:#FF6633; text-decoration:none; } #navi a.s:link,#navi a.s:visited{ color:#B59980; } #main{ width: 800px; margin: auto; text-align:left; font-size:80%; } #main .topimg{ width:500px; float:left; text-align: center; } #main .news{ width:300px; height:300px; float:right; background:url(images/bg_news.gif) no-repeat 0px 20px; } #main .news p{ margin:50px 40px 0px; color: #5D4F41; line-height: 150%; font-size: 12px; } #main .body{ width:550px; float:left; clear:both; } #main .body p{ margin:10px 5px; } #main .menu{ width:183px; float:left; font-size:12px; } #main .tabmenu{ width:250px; float:right; } #main h1 span.jp{ font-size: 12px; letter-spacing: normal; font-family:"MS Pゴシック","Osaka","ヒラギノ角ゴPro"; } #main h2{ margin: 30px 0 5px 0; padding:3px; border-bottom: 4px double #83684F; font-size:180%; color: #333333; clear: both; } #main h3{ margin: 30px 0 5px 0; padding:3px; background-color: #83684F; font-size:120%; color: #FFFFFF; clear: both; } #main th{ padding: 3px 5px; background-color: #F3EBDC; border-bottom:1px solid #83684F; text-align:left; font-weight: normal; color:#A07D5E; } #main a.mail{ padding:5px 0 5px 30px; background:url(images/btn_mail.gif) no-repeat 0px 0px; color: #FF0000; } #main a.mail:hover{ background:url(images/btn_ov_mail.gif) no-repeat 0px 0px; } #main .box{ width:183px; float:left; } #main .box img{ margin:0 8px; filter:chroma(color=#FFFFFF); } #main .box h3{ margin: 0 10px; padding: 3px; font-size:100%; color:#A07D5E; position: relative; top: -10px; background-color: #F3EBDC; } #main .box p{ margin: 0 10px; padding: 0; font-size:10px; top: -5px; position: relative; } #footer{ clear:both; color:#666; font-family: Arial, Helvetica, sans-serif; border-top-width: 3px; border-top-style: solid; border-top-color: #D8D8D8; position: absolute; bottom: 0px; margin:auto; text-align: center; font-size: 75%; height: 30px; width: 100%; } #main .body #mn6 { margin-top: 20px; } /*----------------------------span-*/ span.tel{ font-size:24px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#424242; line-height: 24px; } /*-------------------------------------for any--*/ .clear{ clear:both; line-height:1px; } #main .body p { margin-left: 15px; } #main .topimg { margin-top: 20px; }

    • ベストアンサー
    • Mac
  • CSSのdivで、ページ全体をセンタリング出来ない

    質問させて頂きます。 <style type="text/css"> #contena { margin-right: 10px; margin-left: 10px; text-align: center; height: 900px; width: 950px; } </style></head> というように、全体をdivで囲んだにもかかわらず、何故かセンタリング出来ません。 最も簡単に、このページをセンタリングするには、どうすればよいでしょうか? ホームページビルダーで「どこでも配置モード」で作ったものを、dreamweaverで作り直す場合に該当します。 下記にHTMLを記載しておきます。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta name="IBM:HPB-Input-Mode" content="mode/flm; pagewidth=750; pageheight=900"> <meta name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 14.0.8.0 for Windows"> <title>タイトル</title> <style type="text/css"> #contena { margin-right: 10px; margin-left: 10px; text-align: center; height: 900px; width: 950px; } </style></head> <body background="blue_p7b.gif"> <div id="contena"> <div style="top : 0px;left : 20px; position : absolute; z-index : 20; " id="Layer22"><img src="anim.gif" width="373" height="93" border="0" alt="ようこそ"></div> <div style="top : 18px;left : 575px; position : absolute; z-index : 2; " id="Layer4"><a href="http://www.dodgeball.or.jp/"><img src="jdba1.gif" border="0" width="106" height="30"></a></div> <div style="top : 60px;left : 143px; position : absolute; z-index : 1; " id="Layer1"><img src="logo111.gif" width="488" height="69" border="0" alt="リンク"></div> <div style="top : 219px;left : 317px; position : absolute; z-index : 27; width : 580px; height : 51px; " id="Layer28"> <p><font color="#0000ff" size="+2">コンテンツ</font></p> </div> <div style="top : 161px;left : 647px; position : absolute; z-index : 22; " id="Layer23"></div> <div style="top : 255px;left : 284px; position : absolute; z-index : 28; " id="Layer2"><img src="frendlyindx.gif" width="546" height="410" border="0"></div> <div style="top : 216px;left : 652px; position : absolute; z-index : 23; " id="Layer24"></div> <div style="top : 304px;left : 50px; position : absolute; z-index : 26; " id="Layer27"></div> <div style="top : 754px;left : 47px; position : absolute; z-index : 19; width : 707px; height : 154px; " id="Layer21"><iframe frameborder="1" src="saishijoho.html" width="709" height="150" scrolling="AUTO"></iframe></div> <div style="top : 953px;left : 40px; position : absolute; z-index : 7; " id="Layer9"><a href="taikaikekka.html"><img src="button41.gif" width="57" height="54" border="0" alt=" "></a></div> <div style="top : 659px;left : 48px; position : absolute; z-index : 6; " id="Layer8"><img src="logo1.gif" width="194" height="65" border="0" alt="最新情報 "></div> <div style="top : 1020px;left : 34px; position : absolute; z-index : 12; </div> </body> </html> 詳しい方がいましたら、よろしくお願いします。

  • CSSのボックスの配置他について

    <head> <title>Webサイト</title> <style type="text/css"> <!-- #example { /* 親ボックス */ width: 750px; height: 900px; background-color: #FFEAEF; position: absolute; top: 50px; left: 100px; } { top: 50px; left: 150px; background-color: #FFEAEF } #boxL { /* ボックス左 */ width: 150px; height: 600px; background-color: #ffffff; position: absolute; top: 150px; left: 1px; } #boxR { /* ボックス右 */ width: 599px; height: 600px; background-color: #ffffff; position: absolute; top: 150px; left: 150px; } --> </style> </head> <body> <div id="example"> <div id="example1"><h1>ボックス1</h1></div> <div id="boxL">ボックス左</div> <div id="boxR">ボックス右</div> </div> </body> </html> とタグを打ちこみました。下の部分に文字を書きたいのですがどうすればいいですか?あと、<div id="boxL">ボックス左</div>の所は、普通のHTMLタグを使っても問題ないでしょうか?

  • ナビゲーションの書き方(HTML、CSS)

    以下のように書いているのですが、バックグラウンドの所(#navbar)と、 文字を入れている所(#navbar li a)のところがきれいに重なって 表示するようにできません。 どなたか教えて頂ければ幸いです。宜しくお願いします。 ■HTML <div id="navbar"> <ul> <li id="top"><a href="#" title="#">TOP</a></li> <li id="basic"><a href="#" title="#">基本</a></li> </ul> </div> ■CSS #navbar { background-image:url(../images/navbar.gif); padding:0px; width:1000px; height:35px; float:left; border:solid 1px #D5D5D5; border-bottom:5px solid #66CC33; } #navbar ul{ margin-left: 0px; } #navbar li{ float:left; text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:14px; letter-spacing:1px; line-height:35px; list-style-type:none; width:75px; color:#666666 } #navbar li a { float:left; font-weight:600; font-size:12px; display:block; height:35px; border-right:solid 1px #D5D5D5; width:74px; } #navbar li#top { width:55px; } #navbar li#top a { width:54px; } #navbar li#basic { width:55px; }

    • ベストアンサー
    • HTML