• ベストアンサー

ローカルサイトでは作動しますがネット上ではダメです

まったく初心者ですが、HP用マニュアル(10年位前の本)の付録記述例を参考にDREAMWAVER8で作りました。 ローカルサイトでは8枚の画像が順次かわり正常に作動しますが、UPしたネット上では作動しません。 以下にソースを(何が障りになってるか全くわからないので長いですが、全部)コピーします。 <body> <p><img src="theatertitle.gif" alt="へちまや劇場" width="100" height="26" /></p> <p> <script language="JavaScript" type="text/javascript">var n=1; function next(){ n++; if (n>8) n=1; document.zone.src="zone"+n+".gif"; } function top(){ n; document.zone.src="zone1.gif"; } function back(){ n--; if (n<1) n=8; document.zone.src="zone"+n+".gif"; } </script> <a href="rosemary.html">→第1回上映<br />  【ローズマリーの赤ちゃん】<br /> </a><a href="rosemary.html"><br /> </a><a href="brazil.html">→第2回上映<br />  【ブラジルから来た少年】</a></p> <p><a href="yonimo.html">→第3回上映<br />   【世にも怪奇な物語】</a></p> <p><a href="zone.html">→第4回上映<br />   【デッドゾーン】</a></p> <p>&nbsp;</p> <p>&nbsp;</p> <p class="style2"><span class="style4">※あらすじは途中までですがネタバレの<br /> オソレあり!</span></p> <p class="style2">&nbsp;</p> <p class="style2"><a href="../index.html">→へちまやTOPへ</a></p> <div align="left"> <div align="center" id="main"> <table border="0"> <tr> <td> <img src="zone1.gif" name="zone" width="450" id="zone" /></td> </tr> </table> </div> <div id="navi"> <form> <div align="center"> <p> <input type="button"value="前頁←" onclick="back()" /> <input type="button"value="表紙へ戻る" onclick="top()" /> <input type="button"value="→次頁" onclick="next()" /> </p> <hr /> <p><!-- #BeginLibraryItem "/Library/copyright.lbi" -->Copyright(C)2006 hechimaya. All rights reserved. <br /> 【掲載の記事・写真・イラストなどの無断複写・転載等を禁じます。】 <!-- #EndLibraryItem --></p> </div> </form> </div> </body> よろしくお願いいたします。

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

  • ベストアンサー
  • urecy
  • ベストアンサー率54% (30/55)
回答No.2

<head> <script language="JavaScript" type="text/javascript"> var n=1; function next(){ n++; if( n > 8 ) n = 1; document.zone.src = "zone" + n + ".gif"; } function top(){ document.zone.src = "zone1.gif"; } function back(){ n--; if( n < 1 ) n = 8; document.zone.src = "zone" + n + ".gif"; } </script> </head> <body> <p> <img src="theatertitle.gif" alt="へちまや劇場" width="100" height="26"> </p> <p> <a href="rosemary.html">→第1回上映<br>【ローズマリーの赤ちゃん】<br></a> <a href="rosemary.html"><br></a> <a href="brazil.html">→第2回上映<br>【ブラジルから来た少年】</a> </p> <p><a href="yonimo.html">→第3回上映<br>【世にも怪奇な物語】</a></p> <p><a href="zone.html">→第4回上映<br>【デッドゾーン】</a></p> <p>&nbsp;</p> <p>&nbsp;</p> <p class="style2"><span class="style4">※あらすじは途中までですがネタバレの<br>オソレあり!</span></p> <p class="style2">&nbsp;</p> <p class="style2"><a href="../index.html">→へちまやTOPへ</a></p> <div align="left"> <div align="center" id="main"> <table border="0"> <tr> <td> <img src="zone1.gif" name="zone" width="450" id="zone"> </td> </tr> </table> </div> <div id="navi"> <form> <div align="center"> <p> <input type="button"value="前頁←" onclick="back()"> <input type="button"value="表紙へ戻る" onclick="top()"> <input type="button"value="→次頁" onclick="next()"> </p> <hr> <p><!-- #BeginLibraryItem "/Library/copyright.lbi" -->Copyright(C)2006 hechimaya. All rights reserved. <br> 【掲載の記事・写真・イラストなどの無断複写・転載等を禁じます。】 <!-- #EndLibraryItem --></p> </div> </form> </div> </body> javascriptの関数などは head 部分で定義するのが一般的だと思うので移動させました。 あと、[img] [br] タグの最後にある「スラッシュ」 [br /]は、自分が無知でしたら教えていただきたいのですが。 あまり見たことがないので、消去しました。 n; と、無意味なことをやってる部分があったので消しました。 javascriptの中では、大文字小文字は重要です。 Zone と zone は違うものと判断されます。 質問者様のおっしゃるように、javascriptには問題があるようには見えないので ファイルの場所、ファイル名の指定間違い(大文字、小文字も含め) 等が考えられます。

hechima1
質問者

お礼

N0.1,NO2 様 今回はどうもありがとうございました。 ネットものはやはり几帳面さが大事ですね。 javascriptは初めてですが、使いようによってはファイルが少なくてすみ便利そうなので今後も作ってみようと思います。 ありがとうございました。

その他の回答 (1)

  • takoashi
  • ベストアンサー率39% (21/53)
回答No.1

アップしたファイルと同一のフォルダに画像ファイルをアップしていますか?

hechima1
質問者

お礼

一部、解決しました! script自体に問題がないようなので、もう一度フォルダをみてみたのですが、画像ファイル名が大字になっていたので小文字にしてみたらIEでは正常に作動するようになりました。(safariではダメですが) 同じファイル(大字のまま)のがローカルサイトでは作動していたので、気にしてなかったのですが、 jaavscriptの中では統一しなければならなかったのでしょうか?  まあ、今は動くんだからいいじゃないのといわれればそうなんですが。

hechima1
質問者

補足

返信ありがとうございます。 同じフォルダに画像とhtmlファイルを入れています

関連するQ&A

  • 色のついた外枠を部分的に付けたいのですが、どうすればいいでしょうか?

    色のついた外枠を部分的に付けたいのですが、どうすればいいでしょうか? <tr> <td width="864" class="style49"> <p align="center"><a href="link/ryoukin.html" class="style49"><br /> <img src="image/web_004.gif" alt="格安引越が出来る理由" width="200" height="50" border="0"/></a><strong><a href="link/ryoukin.html" class="style49"><span class="style51"><img src="image/web_003.gif" alt="重要事項説明" width="200" height="50" border="0"/></span></a><a href="link/ryoukin.html" class="style49"><img src="image/web_005.gif" alt="料金計算書・オプション価格" width="200" height="50" border="0"/></a><br /> </strong></p> <p align="center"><strong><br /> <br /> <img src="image/web_010.gif" alt="引越プラン" width="130" height="35" /><br /> <br /> <a href="link/link1.html" class="style49"><span class="style58"><img src="image/web_007.gif" alt="フローチャート式お見積作成" width="200" height="95" border="0"/></span></a> <span class="style58"><a href="link/link0.html" class="style49"><img src="image/web_008.gif" alt="お荷物記載による個別お見積作成" border="0"/></a></span> <a href="http://*****.**.****.**/postmail/postmail2.html" class="style49" ><img src="image/web_009_03.gif" alt="各種お問合せ" border="0"/></a><br /> </strong></p> <p></p> ちなみに引越プランからフローチャート式お見積作成、お荷物記載による個別お見積作成、各種お問合せまで全部を一枠で部分的に外枠で囲みたいのですが、どのようなやり方があるでしょうか? 部分的に囲めなくてすごく困っています。どうかよろしくお願いいたします。

    • ベストアンサー
    • HTML
  • トップページから各ページにリンクできません

    こんにちは。 お世話になります。 会社命令で、初めてホームページを作成しているものです。 表題にもあります通り、アイコン(と言うのでしょうか。ボタンと言うのでしょうか。「アクセス」などと書かれて、それを押すと、各ページに飛ぶようにする小さな画像です) から、各ページに飛ぶようにしたいのですが、上手くいきません。 一つ目のアイコンからは飛ぶように上手くリンクが貼れたのですが、二つ目以降、 が上手く貼れません。 最初にリンクを貼ったアイコンが青い枠で囲まれており、そのためか、 他のアイコンをドラッグして選択状態にしても、最初にリンクを貼った時の様に リンクを貼ることができないのです。 ページの他の画像、インラインフレーム等を選択しても、その青い枠は消えません。 どうすれば、この青い枠が無くなり、他のアイコンからもリンクを貼ることができるでしょうか? 私が入力したソースは、下記の通りになります。 <html> <head> <meta content="text/html; charset=Shift_JIS" http-equiv="content-type"> <title>台湾</title> <style type="text/css"></style> </head> <body background="image/085.jpg"> <br>   <p align="center"><big><big><big><big><big><b>abcd</b></big></big></big></big></big></p> <p align="center"><img src="image/080527_pandafullife_main.jpg" alt="" height="312" hspace="100" width="672">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> <div align="center">&nbsp; <b> <br> <big>&nbsp;+更新情報+</big>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> <br> </b></div> <p style="height: 17px;" align="center">  <iframe style="top: 600px; left: 650px; width: 457px; height: 121px;" src="image/inraflame3.html" name="" id="center" marginheight="3" frameborder="1" scrolling="yes"></iframe><a><br> <br> &nbsp;&nbsp;</a><a href="about%E3%83%9A%E3%83%BC%E3%82%B8%E7%94%A8%E3%83%87%E3%83%BC%E3%82%BF.html">&nbsp;</a><a href="about%E3%83%9A%E3%83%BC%E3%82%B8%E7%94%A8%E3%83%87%E3%83%BC%E3%82%BF.html"> </a><a href="aboutpagedate.html"><img alt="" src="image/02.gif" height="20" width="100"> <img alt="" src="image/07.gif" border="0" height="20" width="101"> <img alt="" src="image/04.gif" border="0" height="20" width="100"> </a></p> </body> </html> どなたか、お力を貸しては下さいませんでしょうか? 宜しくお願い致します。

    • ベストアンサー
    • HTML
  • リンクの文字とリンクの文字を横に並ばす時に適度にスペースを入れたいので

    リンクの文字とリンクの文字を横に並ばす時に適度にスペースを入れたいのですがどうすればよいでしょうか?特に「はいそうです。」と「いいえ、違います」のリンク文字の間にスペースをキーボードから打ち込もうとすると、リンクの下線が伸びてしまうのですが・・・。文字の下のリンクの下線は残したまま、スペースの時に下線が伸びないようにするにはどうすればよいでしょうか? <style type="text/css"> <!-- .style1 { font-size: x-large; font-weight: bold; } --> </style> </head> <body> <p class="style1"><img src="../image/web_013.gif" alt="引越元も引越先も1階かつ目の前でこちらが用意した台車は使用可能ですか?" width="400" height="77" /></p> <div align="justify"> <a href="link3.html"><span class="style1">1.はいそうです。 </span></a> <a href="link0.html"><span class="style1"> 2.いいえ、違います。</span></a><br /> </div> <p><span class="style1">   <img src="../image/web_024.gif" alt="引越元と引越先" width="300" height="357" /></span> <a href="link1.html"></a></p> <a href="link1.html"> <p align="left" class="style1"><input type="button" value="前へ戻る" onclick="window.history.back()" /> </p> </a> <a href="../index.html"> <p align="center">トップページへ戻る</p> </a> <p class="style1">&nbsp;</p> </body> </html>

    • ベストアンサー
    • HTML
  • 題字の大きさが小さくなってしまいます

    こんにちは。 お世話になります。 会社命令により、生まれて初めてホームページを作成しているものです。 表題にも有りますように、ホームページの題字(と言うのでしょうか。ホームページの名前が書かれた文字列です)を、普通の文字と同じように入力し、その後、大きさを変え、希望通りの物を作成いたしました。 ですが、作成中の画面ですとちょうどいい大きさなのですが、「閲覧」を選んで表示された画面を見ると、文字のサイズが明らかに小さくなっており(約3分の1)、どうやっても大きさを変えることができません。 使用しているフォントが、対応していないものなのかとも思い、一般的なフォントでも試してみましたが、やはり、文字の大きさは小さいままで、作成画面と同じ大きさにはなりません。 下記が、私の入力致しましたソースです。 <html> <head> <meta content="text/html; charset=Shift_JIS" http-equiv="content-type"> <title>台湾</title> <style type="text/css"></style> </head> <body background="image/085.jpg"> <br>   <p align="center"><big><big><big><big><big><b>abcd</b></big></big></big></big></big></p> <p align="center"><img src="image/080527_pandafullife_main.jpg" alt="" height="312" hspace="100" width="672">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> <div align="center">&nbsp; <b> <br> <big>&nbsp;+更新情報+</big>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> <br> </b></div> <p style="height: 17px;" align="center">  <iframe style="top: 600px; left: 650px; width: 457px; height: 121px;" src="image/inraflame3.html" name="" id="center" marginheight="3" frameborder="1" scrolling="yes"></iframe><a><br> <br> &nbsp;&nbsp;</a><a href="about%E3%83%9A%E3%83%BC%E3%82%B8%E7%94%A8%E3%83%87%E3%83%BC%E3%82%BF.html">&nbsp;</a><a href="about%E3%83%9A%E3%83%BC%E3%82%B8%E7%94%A8%E3%83%87%E3%83%BC%E3%82%BF.html"> </a><a href="aboutpagedate.html"><img alt="" src="image/02.gif"  border="0" height="20" width="100"></a><a href="daiary.html"><img alt="" src="image/07.gif" height="20" width="100"></a><a href="aboutpagedate.html"><img alt="" src="image/04.gif"  border="0" height="20" width="100"></a></p> </body> </html> この中の、 <p align="center"><big><big><big><big><big><b>abcd</b></big></big></big></big></big></p> の「abc」という文字列を大きく、太いものとしたいともいます。 製作画面ですと、大きさは1.5cm四方、閲覧画面ですと5mm程です。 どなたか、お力を貸しては頂けないでしょうか? 宜しくお願い致します。

    • ベストアンサー
    • CSS
  • 初めてCSSをデザインに取り入れたらレイアウトが崩れてしまいました・・。

    dreamweaverMX2004を使用しているホームページ作成初心者です。 スクロールバーが付いているテキストボックス(更新画面用)の下に文字なり画像なりを入れると、なぜかだいぶん間が空いて表示されてしまいます。テキストボックスの高さを400くらいの大きな数字を指定すると間はなくなるのですが、どうしても高さ200~250くらいに指定したいんです…。 参考になるかも知れないので、コードを貼り付けておきます。 以前、教えてgooで同じような質問があって、そのときにどなたかが、 http://cssbug.at.infoseek.co.jp/detail/winie/b053.html を紹介していたので、もしかしたらこの状態なんでしょうか?あるいは、決定的なミスをしているのでしょうか? どなたかご存じの方、いらっしゃったら、どうぞお願いいたします。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> <title>無題ドキュメント</title> <style type="text/css"> <!-- .style1 { color: #000000; font-size: 12px; } .style2 {font-size: 12px} .style4 {color: #000099; font-weight: bold; } --> </style> </head> <body> <style type="text/css"><!-- html, body { scrollbar-base-color: #D5D0F7; } --></style> <table width="800" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="279" height="357">&nbsp;</td> <td colspan="2" valign="top"><style type="text/css"> <!-- .memo { width: 470px; height: 220px; overflow: auto; } --> </style> <div class="memo style1"> <p align="left" class="style1 style2">&nbsp; </p> <p align="left"><span class="style4">2008年1月4日更新</span><br> あけましておめでとうございます。<br> </p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">&nbsp;</p> <p align="left" class="style1 style2">あけましておめでとうございます。<br> </p> </div></td> </tr> <tr> <td height="43"></td> <td width="248" valign="top">pppp</td> <td width="273">&nbsp;</td> </tr> </table> <br> </body> </html>

  • 初歩的かもしれませんが回り込みが上手くできません

    初歩的かもしれませんが回り込みが上手くできません イメージ的には、図のようなdivを4つ横に並べて改行、同じように繰り返したいです。 ■■■■ ■■■■ しかし、下記の様にすれば ■■■ ■ ■■■ ■ に、なってしまいます。 こういう場合、どうすればいいのでしょうか?? <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave1</a></div> <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave2</a></div> <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave3</a></div> <div class="sample" style=" width:120px; "><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave4</a></div> <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave5</a></div> <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave6</a></div> <div class="sample" style=" width:120px; float:left;"><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave7</a></div> <div class="sample" style=" width:120px; "><a href="http://okwave.jp" target="_blank"><img src="okwave.png" height="80" width="120"><br>okwave8</a></div>

    • ベストアンサー
    • CSS
  • フレームの入れ方

    こんにちは、お世話になります。 ホームページ初心者です。 現在、会社命令で生まれて初めてホームページと言うものを作成しています。 上司に渡されたテキストを参考にして、やっているのですが、 以下にあげます事項が、どうしても反映されず、また、どの場所に必要なタグを入力すべきかが分かりません。 1、左脇に、縦長に、背景は白く、フレームを入れたい。 2、インラインフレームの背景を白くし、常にスクロールできるようにしたい。 以上です。 また、私が現在入力しているデータ(?)は、下記の様になります。 <html> <head> <meta content="text/html; charset=Shift_JIS" http-equiv="content-type"> <title>台湾</title> <style type="text/css"></style> </head> <body background="image/085.jpg"> <br>   <p align="center"><big><big><big><big><big><b>abcd</b></big></big></big></big></big></p> <p align="center"><img src="image/080527_pandafullife_main.jpg" alt="" height="312" hspace="100" width="672">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> <div align="center">&nbsp; <b> <br> &nbsp;+更新情報+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br> </b></div> <p style="height: 17px;" align="center">  <iframe style="top: 600px; left: 650px; width: 457px; height: 121px;" src="image/flame.html" name="" id="center" marginheight="0" frameborder="1" scrolling="yes"></iframe><a><br> <br> </a></p> </body> </html> どなたか、お力を貸しては頂けないでしょうか。 ほとほと、困り果てております。 宜しくお願い致します。

  • フレームの入れ方が、さっぱりわかりません。

    こんにちは、お世話になります。 ホームページ初心者です。 現在、会社命令で生まれて初めてホームページと言うものを作成しています。 上司に渡されたテキストを参考にして、やっているのですが、 以下にあげます事項が、どうしても反映されず、また、どの場所に必要なタグを入力すべきかが分かりません。 1、左脇に、縦長に、背景は白く、フレームを入れたい。 2、インラインフレームの背景を白くし、常にスクロールできるようにしたい。 以上です。 また、私が現在入力しているデータ(?)は、下記の様になります。 <html> <head> <meta content="text/html; charset=Shift_JIS" http-equiv="content-type"> <title>台湾</title> <style type="text/css"></style> </head> <body background="image/085.jpg"> <br>   <p align="center"><big><big><big><big><big><b>abcd</b></big></big></big></big></big></p> <p align="center"><img src="image/080527_pandafullife_main.jpg" alt="" height="312" hspace="100" width="672">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> <div align="center">&nbsp; <b> <br> &nbsp;+更新情報+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br> </b></div> <p style="height: 17px;" align="center">  <iframe style="top: 600px; left: 650px; width: 457px; height: 121px;" src="image/flame.html" name="" id="center" marginheight="0" frameborder="1" scrolling="yes"></iframe><a><br> <br> </a></p> </body> </html> どなたか、お力を貸しては頂けないでしょうか。 宜しくお願い致します。

    • ベストアンサー
    • CSS
  • コンテンツとコンテンツの詰まり

    Windows XP あるいは8 HTML 4.01 コピー ~ TOP.html copyTOP.css あああああ と  いいいいいの間隔はあいているのに いいいいい と  うううううの間隔はなぜか詰ってしまっています。 間隔を空けるにはどうしたらいいでしょうか? コードは以下の通りです。 [ HTML 側 ] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/Transitional.dtd"> <html lang="ja"> <head> <meta http-equiv="Content-Type" Content="text/html;charset=Shift_JIS"> <META HTTP-EQUIV="CONTENT-STYLE-TYPE" CONTENT="~"> <title>aaaaaaaaaa</title> <link rel="stylesheet" href="copyTOP.css" type="text/css"> </head> <body> <div id="zentai"> <div id="part"> <p class="title">あああああ</p> <div id="partnerwaku"> <div id="partnerimage"> <a href="" alt="のロゴ" class=""></a> <a href="" alt="のロゴ" class=""></a> <a href=""><img src=".gif" alt="のロゴ" class=""></a> <a href=""><img src=".jpg" alt="のロゴ" class="A"></a> <a href=""><img src=".jpg" alt="のロゴ" class=""></a> </div> </div> </div> <div id="PR"> &lt;PR&gt; <br> <div id="PRsection"> <br> <a href=""> <img src="" alt="" class="PRimage01"></a> </div> </div> <div id="PR2"> <br> &lt;PR&gt; <br> <div id="PRsection2"> <br> <a href=""> <img src="" alt="" class="PRimage02"></a> </div> </div> <div id="columnwaku"> <div id="columnbun"> <p class="title">いいいいい</p> <div id="columncontents"> <p><a href=""><img src =".jpg" class="columnarticle01"></a></p> </div> </div> </div> <br> <br> <br> <br> <div id="PR3"> <br> &lt;PR&gt; <br> <div id="PRsection3"> <br> <a href=""><img src="" alt="" class="PRimage03"></a> </div> </div> <br> <br> <br> <br> <br> <div id="questionnairesection"> <div id="questionnaire"> <p class="title">ううううう</p> <div id="questionnairecontents">えええええ</div> </div> </div> <div id="PR4"> <br> &lt;ddd&gt; <br> <div id="PRsection4"> <br> <a href=""> <img src="" alt="" class="PRimage04"></a> </div> </div> <div id="pagetop"> <br> <br> <a href="#logoimage">ページの先頭へ▲</a> </div> <hr class="beforefooter"> <div id="aboutus"> <div id="aboutussection"> <p class="aboutustitle">管理会社</p> <p><a href="Aboutus.html"><img src ="Aboutus.jpg" class="aboutusimage"></a></p> </div> </div> <br> <br> <hr class="beforefooter"> </div> <!--全体のdiv--> </body> </html> [ css側] @charset "Shift_Jis"; body { overflow-y:auto overflow-x:auto text-align:center; cursor:url("images/.png"); } #allitem{ cursor:url("images/.png"); } #zentai{ width:1000px; margin-left:auto; margin-right:auto; } .title{ margin-top:0px; margin-bottom:0px; font-size : 20px; border-style:solid; width:592px; background-color:#FFFF99; padding:3px; } #part{ clear:left; float:left; height:180px; width:642px; padding-right:147px; font-size : 20px; } #partnerwaku{ height:140px; width:600px; border-style:solid; border-color: #000099; } #PR{ float:left; width:180px; height:120px; } #PRsection{ border-style:solid; border-color: #000099; } #PR2{ float:left; width:185px; height:150px; } #PRsection2{ border-style:solid; border-color: #000099; } .PRimage01{ width:170px; height:80px; } .PRimage02{ width:165px; height:100px; } #kuhaku{ clear:left; height:20px; } #columnwaku{ float:left; clear:left; height:130px; width:790px; } #columnbun{ height:120px; width:600px; } #columncontents{ height:140px; width:600px; border-style:solid; border-color: #000099; } .columnarticle01{ height:70px; width:400px; background-color:#CC99CC; } #PR3{ float:left; width:185px; height:150px; } #PRsection3{ border-style:solid; border-color: #000099; } .PRimage03{ width:165px; height:100px; } #questionnairesection{ clear:left; float:left; height:130px; width:1050px; } #questionnaire{ width:600px; border-radius: 20px; } #questionnairecontents{ height:140px; width:600px; border-style:solid; border-color: #000099; } #PR4{ float:left; width:185px; height:150px; } #PRsection4{ border-style:solid; border-color: #000099; } .PRimage04{ width:165px; height:100px; } 文字制限のため省略

    • ベストアンサー
    • HTML
  • 携帯サイトの背景と文字位置が反映されません

    携帯サイトを作っています。 参考にしたのは「All about」にあった携帯サイトの作り方で 試したのですが、背景や文字位置等がうまく反映されません。 下がソースです。(東京のお菓子というのは仮に入れてます) 具体的にはバックグラウンドを指定してもバックグラウンドが表示されず、centerを指定しても全部左寄せになってしまいます。 ちなみにパソコンで見るときちんと表示されています。 私の持っているdocomoの端末(P902iS)ですとバックグラウンドが表示されず 左寄せになってしまいます。 それぞれにスタイルで文字の大きさや背景などを指定するやり方は ALL aboutの携帯サイトの作り方を参考にしています。 何か間違いなどあればご指摘いただけないでしょうか? よろしくお願いします。 <?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml ; charset=Shift_JIS" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="keywords" content="お菓子,お花" /> <meta name="description" content="東京のお菓子お花屋です" /> <title>東京お菓子お花title> </head> <body> <div style="background-color:#cc0000; color:white;">お菓子屋さん<br /> (東京お菓子)<br /> 東京都</div> <div style="text-align:center;"><img src="******title1.gif" width="80" height="120" border="0" /></div> <div style="font-size : smaller;color : #624a20;text-align : left;">お菓子屋さんではお菓子やお花を販売しています。東京にあります。<br /> </div> <div style="font-size : smaller;color : green;">◆<a href="index.html">トップページ</a><br /> ◆<a href="okashi.html">お菓子屋のご紹介</a><br /> ◆<a href="ohana.html">お花のご案内</a><br /> ◆<a href="zakka.html">雑貨のご案内</a><br /> ◆<a href="access.html">アクセス</a><br /> ◆<a href="http://www.*******.com/">PCホームページ</a><br /> </div> <div style="font-size : smaller;color : #624a20;text-align : left;">お電話、メールにてお気軽にお問い合わせ下さい。またパソコン用HPもありますので、詳しくはそちらもご覧下さい。<br /> </div> <div style="color : #ffffff;background-color : #a57e37;text-align : center;">◎お問い合せ◎</div> <div style="text-align:center; font-size:smaller;">電話での問合せ<br /> <a href="tel:03*********">03-***-****</a><br /> メールでの問合せ<br /> <a href="mailto:info@******.com">コチラ</a></div> <div style="font-size : smaller;color : #660000;text-align : center;">お菓子屋さん<br /> ***-****<br /> 東京都<br /> 渋谷区******</div> </body> </html>

専門家に質問してみよう