レイアウトが崩れる・・・

このQ&Aのポイント
  • wordpressでギャラリーを使った記事を書いたのですが、3枚以上写真を追加してしまうとレイアウトが崩れてしまいます。
  • どうすれば何枚追加しても崩れずに追加できるでしょうか?
  • 参照ページ:http://blackartcard.com/?p=45
回答を見る
  • ベストアンサー

レイアウトが崩れる・・・

いつもお世話になってます。 wordpressでギャラリーを使った記事を書いたのですが、3枚以上写真を追加してしまうとレイアウトが崩れてしまいます。 参照ページ:http://blackartcard.com/?p=45 どうすれば何枚追加しても崩れずに追加できるでしょうか? single.phpは以下です。 <?php get_header(); ?> <!-- Contents --> <div id="contents"> <div id="main"> <div class="breadcrumbs"> <?php if(function_exists('bcn_display')) bcn_display();?> </div> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h1 class="title"><?php the_title(); ?></h1> <div class="blog_info"> <ul> <li class="cal"><?php the_time('Y年m月d日') ?></li> </ul> <br class="clear" /> </div> <div class="kiji"><?php the_content(); ?></div> </div><!-- /.post --> <?php endwhile; ?> <?php else : ?> <h2 class="title">記事が見つかりませんでした。</h2> <p>検索で見つかるかもしれません。</p><br /> <?php get_search_form(); ?> <?php endif; ?> </div><!-- /#main --> </div></div> <?php get_footer(); ?> 宜しくお願い致します。

  • 01mk
  • お礼率62% (45/72)
  • CSS
  • 回答数2
  • ありがとう数2

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

  • ベストアンサー
  • weakweak
  • ベストアンサー率34% (350/1003)
回答No.1

こんにちは。 記事ページは、 <div id="main">  ~省略~ <div id="kiji">  ~問題のギャラリー部分~ </div>  ~省略~ </div> という構造になっていましたが、調べたらなぜかmainに高さが設定されてました。 ご存知かもしれませんがdivタグと言うのはボックス要素と言われるように記事や写真などの色々な要素を入れる箱のような役割を果たします。 質問者さんの場合は高さ980cm(実際はpx)の箱の中に合計1200cmの荷物を入れようとしていたようなものです。そしてその箱(div="main"のこと)の高さを定義しているのはstyle.cssというファイルなので、それを以下のように修正してください。 1. 以下のファイルを編集しますので、テキストエディタで開いてください。 <WordPressが設置されているフォルダ>\wp-content\themes\<今有効にしている、問題のテーマ>\style.css 2. 次の文字列を探してください(キーボードで「Ctrl」を押しながら「F」を押すと検索ウィンドウがどこかに出るはず) #main 3. 以下のように、#mainの脇に「 { 」というカッコがあって、次の行から色々とmain要素について定義されていると思いますが、そのなかの height : 1100px; を min-height : 1100px; に書き換えてください。/*~*/内は私の解説です。 #main { ~いろんな定義~ height : 1100px; /* これは「高さは何かがはみ出ようと絶対に1100pxです!」という意味 */ } /* これをこうします */ #main { ~いろんな定義~ min-height : 1100px; /* これは「高さは最低1100pxです!」という意味。無くてもレイアウトは崩れないし、ページの下まで行くと右下に現れるカワイイのを表示させたければ500pxに設定しておけば大丈夫みたいです */ }

01mk
質問者

お礼

なるほど!!min-heightはそうやって使うんですね・・・・ 勉強になります!!! ありがとうございました!無事修正できました!

その他の回答 (1)

  • weakweak
  • ベストアンサー率34% (350/1003)
回答No.2

少し気になったのですが、このテーマはどこかで配布されていたものなんでしょうか? もしご自身で作られたのであればおしゃれなデザインですね!

01mk
質問者

お礼

これは自分で作成しました!そう言ってもらえると嬉しいです!

関連するQ&A

  • レイアウトが崩れてしまう原因を教えて下さい。

    添付データのようなデザインをtableを使わずに作りたいのですが、 テキスト数の増減やphotoのmarginをいじるとレイアウトが崩れてしまいます。 テキストが増えても減ってもレイアウトが崩れない方法はありますか? <style type="text/css"> .contents{ width: 650px; margin-right: auto; margin-left: auto; } .contents ul{ list-style: none; } .contents ul li.photo{ float: left; border: 1px solid #ccc; padding: 5px; } .contents ul li.text, .contents ul li.title{ margin-left: 200px; } .contents ul li.title{ margin-top: 20px; margin-bottom: 10px; color: #111; } .contents ul li.text{ font-size: 14px; } .contents ul li.photo a img{ border-style: none; outline: none; } .contents ul li.title a:hover{ color: #ccc; } </style> <div class="contents"> <ul> <li class="photo"><a href=""><img src="sample.jpg" alt="サンプル" width="150" height="100" /></a></li> <li class="title"><a href=""><u>これはサンプルです</u></a></li> <li class="text">テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</li> </ul> </div> <div class="contents"> <ul> <li class="photo"><a href=""><img src="sample.jpg" alt="サンプル" width="150" height="100" /></a></li> <li class="title"><a href=""><u>これはサンプルです</u></a></li> <li class="text">テキストテキストテキストテキストテキストテキスト</li> </ul> </div> <div class="contents"> <ul> <li class="photo"><a href=""><img src="sample.jpg" alt="サンプル" width="150" height="100" /></a></li> <li class="title"><a href=""><u>これはサンプルです</u></a></li> <li class="text">テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</li> </ul> </div>

    • ベストアンサー
    • HTML
  • CSSレイアウト マージンについて

    下記のタグにてメインスペースを両側10pxにしたいのですが、うまくいきません。 下記のようなレイアウトにてうまくmarginなどを行う場合は どのようにしたらよろしいでしょうか? なお簡単にタグを記載してくださいますと幸いです。 CSS body {    margin:3em; color:#339900; background:#ffffff; } h1 { padding:0.1em; text-align:center; leter-specing:1em; border-top: 1px solid #000000; border-bottom: 1px solid #000000; } .mainspace { background:#aaaaaa; width:480px;       margin-right:10px;       margin-left:10px ; position:absolute; left:260px; } .leftmenu { background:#bbbbbb; width:200px; position:absolute; left:50px; } .rightmenu { background:#cccccc; width:200px; position:absolute; right:50px; } HTML <h1>メインタイトル</h1> <div class="mainspace"> <h2>サブタイトル</h2> <p> ただいまテスト中です。<br> ただいまテスト中です。<br> ただいまテスト中です。<br> ただいまテスト中です。<br> ただいまテスト中です。<br> </p> </div> <div class="leftmenu"> <ul> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> </ul> </div> <div class="rightmenu"> <ul> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> <li>メニュー</li> </ul> </div>

    • ベストアンサー
    • HTML
  • カラム崩れが・・・

    トップページでは崩れてないのですが記事にはいると崩れてしまいます。 どうすれば治りますか?? ページ単体のphpは以下です。 ーーーーーーーーーーーーーーーーーーーーーーーーーー <?php get_header(); ?> <div id="column"> <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="content"> <div id="image"> <?php the_post_thumbnail(); ?> </div> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></h2> <p> <?php the_content('Read the rest of this entry &raquo;'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </p> <div class="clear"></div> <?php comments_template(); ?> <div class="clear"></div> <div id="tags"> <div id="toptags"></div> <span class="user"><?php the_author_posts_link('namefl'); ?> &raquo <?php the_time('d F, Y') ?> &raquo <?php the_category(', ') ?> <?php the_tags(' &raquo Tags:', ', ', '<br />'); ?> </span> </div> <div class="clear"></div> </div> </div> <?php endwhile; ?> <?php else : ?> <div class="post"> </div> <div class="content"> <h2>Page Not Found</h2> <p>Sorry, but you are looking for something that isn't here.</p> <h3>Search Blog</h3> <?php include(TEMPLATEPATH."/searchform.php"); ?> </div> </div> <?php endif; ?> <?php get_footer(); ?> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー 他にも必要なphpがあれば言ってください。 宜しくお願い致します。

    • ベストアンサー
    • CSS
  • CSSレイアウト positionについて

    下記のタグにてpositionタグを使って指定した場合 IEの文字サイズを変更しるとcopyrightと言うboxが ずれてしまいます。ずれない方法はありませんでしょうか? お分かりの方のご回答をお待ちしております。 なお簡単なタグを記載してくれると幸いです。 body {    margin-left:3em; margin-left:3em; } .mainspace { width:480px; position:absolute; left:260px; padding-top:10px; padding-bottom:10px; } .leftmenu { width:200px; height:280px; position:absolute; left:50px; padding:5px; } .rightmenu { width:200px; height:280px; position:absolute; left:750px; padding:5px; } .copyright { text-align:center; position:absolute; left:50px; top:480px;       width:900px padding-bottom:10px; padding-top:10px; } HTML <h1>タイトル</h1> <div class="mainspace"> <h2>タイトル</h2> <br> <h2>タイトル</h2> <br> </div> <div class="leftmenu"> <h3>メニュー</h3> <ul> <li><a href="">テスト</a></li> <li><a href="">テスト</a></li> </ul> <h3>メニュー</h3> <ul> <li><a href=""></a>テスト</li> <li><a href=""></a>テスト</li> </ul> <h3>メニュー</h3> <ul> <li>テスト</li> <li>テスト</li> </ul> </div> <div class="rightmenu"> <h3>サブタイトル</h3> <br> </div> <div class="copyright"> test </div>

    • ベストアンサー
    • HTML
  • WordPress PCとスマホで表示を切り替える

    PCでは記事一覧5件、スマホでは3件表示するようにしたいです。 条件分岐タグを使って、PCとスマートフォンで記事の一覧表示を切り替える方法がうまくいきませんでした。 https://handywebdesign.net/2017/11/wp-is-mobile/ 改造前のコード(問題なく表示できました) <ul> <?php $latest_posts = get_posts( array( 'posts_per_page' => 5, // 表示する記事の数 'category_name' => '投稿ID',// 投稿IDを取得 'fields' => 'ids', ) ); foreach( $latest_posts as $post ): setup_postdata( $post ); if( has_post_thumbnail() ) { $post_thumb = get_the_post_thumbnail( '', 'post_thumbnail' ); // アイキャッチがあるときはアイキャッチを表示 } else { $post_thumb = '<img src="' . get_template_directory_uri() . '/img/noimage.gif" width="100" height="100" alt="デフォルト画像" />'; // アイキャッチがないときは《noimage.gif》を表示 } $post_categories = get_the_category(); // カテゴリーを取得 $post_content = wp_trim_words( get_the_content(), 30, '…' ); // 30字分を抜粋 ?> <li <?php post_class(); ?>> <a href="<?php the_permalink(); ?>"> <div class="blogListimg"> <?php echo wp_kses_post( $post_thumb ); ?> </div> <!-- アイキャッチここまで --> <p class="post-time blogDt"><?php the_time('Y.m.d'); ?></p> <p class="post-categories blogCt"><?php echo esc_html( $post_categories[0]->name ); ?></p> <h3 class="post-title"><?php the_title(); ?></h3> <p class="post-content blogBf"><?php echo esc_html( $post_content ); ?></p> </a> </li> <?php endforeach; wp_reset_postdata(); ?> </ul> PCとスマートフォンで記事の一覧表示を切り替えるコード 参考サイトを参考にfunctions.phpにfunction is_mobile() コードを追加。 トップページのphpに以下を改造。 <?php if ( is_mobile() ) : ?> <?php $latest_posts = get_posts( array( 'posts_per_page' => 5, // 表示する記事の数 'category_name' => '投稿ID',// 投稿IDを取得 'fields' => 'ids', ) ); foreach( $latest_posts as $post ): setup_postdata( $post );  ・  ・  ・ <?php else: ?> <?php $latest_posts = get_posts( array( 'posts_per_page' => 3, // 表示する記事の数 'category_name' => '投稿ID',// 投稿IDを取得 'fields' => 'ids', ) ); foreach( $latest_posts as $post ): setup_postdata( $post );  ・  ・  ・ <?php endforeach; wp_reset_postdata(); ?> </ul> 結果は真っ白になってしまいました。 HTMLソースも真っ白です。 空白はSublime Textのテキストエディターを使っていますので、確認しております。 どこが違うか、教えてくださいますか? よろしくおねがいします。

    • ベストアンサー
    • PHP
  • Wordpressで特定カテゴリーの一覧ページ

    今特定のカテゴリーの一覧ページを作りたいのですがうまく作れません。 http://snapkidz.biz/wp/?cat=4(現状) 本当はhttp://blackartcard.com/?cat=4のような感じで作りたいんですがうまくいきません。 二つとも自分のサイトなのですが、http://blackartcard.com/?cat=4の方はテンプレートをいじって作ったので、うまくいっただけです。 アーカイブ.phpを同じ物をsnapkidz.bizにいれたのですがレイアウトがヘッダー部分に表示されるようになってしました。 アーカイブの中身は以下です。 <?php /** * @package WordPress * @subpackage Modularity */ ?> <?php get_header();?> <div> <?php query_posts($query_string.'&posts_per_page=2'); if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <div class="clear"></div> <div class="content"> <?php while (have_posts()) : the_post(); ?> <div class="archive-top"> <?php the_post_thumbnail('full'); ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'modularity' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title() ?></a></h2> <div class="clear"></div> <p class="postmetadata alt quiet"> <?php $tag_list = get_the_tag_list( '| Tags: ', ', ' ); printf( __( '%1$s | Categories: %2$s %3$s | ', 'modularity' ), get_the_time( get_option( 'date_format' ) ), get_the_category_list( ', ' ), $tag_list ); ?> </p> <hr /> </div> <?php endwhile; ?> <div class="clear"></div> <div class="navigation"> <div class="alignleft"><?php next_posts_link( __( '&laquo; 前の記事', 'modularity' ) ); ?></div> <div class="alignright"><?php previous_posts_link( __( '次の記事 &raquo;', 'modularity' ) ) ?></div> </div> <div class="clear"></div> <?php else : ?> <h2 class="center"><?php _e( 'Not Found', 'modularity' ); ?></h2> <?php get_search_form(); ?> <?php endif; ?> </div> </div> </div> <!-- Begin Footer --> <?php get_footer(); ?> どうすればヘッダー下にうまく表示できるでしょうか?? 宜しくお願い致します。

    • 締切済み
    • CSS
  • Wordpressで記事がない場合にメッセージ表示

    現在Wordpressで特定のカテゴリを一覧表示させる設定を行っています。 ただ、記事が一件もない場合に、その旨を伝えるメッセージを表示させたいのと全てを非表示にさせたいと思っているのですが上手くいきません。(メッセージを表示とコンテンツ全体非表示の2つの方法をお伺いしたいです) 以下、実際のソースになるのですが、該当するカテゴリに記事が0件の場合 「○○に関する記事は現在ありません。」 と表示させるにはどうしたらよいでしょうか? <h2 class="entry-title">カテゴリ1の投稿一覧</h2> <div class="container"> <?php $postslist = get_posts('numberposts=-1&orderby=post_date&order=DESC&cat=1'); foreach ($postslist as $post) : setup_postdata($post); ?> <ul class="hogehoge"> <a href="<?php the_permalink(); ?>" ><img src="<?php echo catch_that_image(); ?>" /></a> <li><a href="<?php the_permalink();?>"><b><?php the_title(); ?></b></a><br /> <a href="<?php the_permalink();?>"><?php echo mb_substr(get_the_excerpt(),0, 80);?>…</a> </li> </ul> <?php endforeach; ?> </div><!-- /container --> 2つ目の質問となりますが、投稿が0の場合にメッセージの表示ではなく、 <h2 class="entry-title">カテゴリ1の投稿一覧</h2> から、 </div><!-- /container --> まで、全てのレイアウトを含めた表示を非表示にするにはどのような定義を行えばよいでしょうか? 試行錯誤試してみたのですが、本件2つの方法が解決できませんでした。 お詳しい方いらっしゃいましたらアドバイスのほどお願いいたします。 よろしくお願いします。

    • ベストアンサー
    • PHP
  • wordpressの記事一覧が文字化け

    wordpressを使って、その記事一覧をHTML内に表示しています。 するとタイトルやHTMLの全角文字が文字化けしphpで書き出している部分だけ正常に表示されます。 http://wordpress.main.jp/main2.php コードの内容は <?php require('./wordpress/wp-blog-header.php'); ?> <html> <head> <title>文字化けPHP</title> </head> <body> <p align="center">文字化けしてしまいます。</p> <div align="center"> <table width="400" border="1" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <div> <?php $posts = get_posts('numberposts=3'); foreach($posts as $post) : setup_postdata($post); ?> <?php the_date(); ?> <br> <ul> <li><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"> <?php the_title(); ?> </a></li> </ul> <?php endforeach; ?> </div></td> </tr> </table> </div> <p align="center">文字化けしてしまいます。</p> </body> </html> ---------------------------------------- です。 PHPは全然わかりませんが、調べてみて今までやったことは ・文字コード宣言をいろんなものに変えた。 ・wordpress > wp-includes > wp-db.phpに  @mysql_query(”SET NAMES ‘utf8′”, $this->dbh);を追加。 等、やってきましたが、解決しません。 現在はロリポップに新規にインストールしてすべてデフォルトの状態です。 文字化け回避の方法をよろしくお願い致します。

    • ベストアンサー
    • PHP
  • headerをページによって表示、非表示にする

    トップページのみヘッダーのjavasprictを使い、他ページでは非表示にしたいのですが、header.phpをもう一つ作り(javaのタグが入ってないもの)別名で保存し、header.phpと同じデレクトリーに保存しページの<?php get_header(); ?>の部分を<?php get_header1(); ?>に変えたのですがエラーでした。 これはどうすれば別々に見る事ができるでしょうか?? 今のページ設定は以下になってます。 <?php get_header(); ?> <div class="span-24" id="contentwrap"> <div class="span-14"> <img src="http://pimpkidz.com/wp/wp-content/uploads/2011/08/side.jpg" /> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <div id="indexthumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail(array( 200,200 ), array( 'class' => 'post_thumbnail' )); ?></a></div> <div id="indexcontent"> <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <p class="postdate"><span><?php the_time('Y/n/j(D)') ?> </span></p> <div class="entry"> <?php echo excerpt(40); ?> <div class="readmorecontent"> <a class="readmore" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Continue</a> </div> </div> </div> <div style="clear:both;"></div> </div><!--/post-<?php the_ID(); ?>--> <hr><?php endwhile; ?> <?php else : if ( is_category() ) { // If this is a category archive printf("<h2 class='pagetitle'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false)); } else if ( is_date() ) { // If this is a date archive echo("<h2 class='pagetitle'>Sorry, but there aren't any posts with this date.</h2>"); } else if ( is_author() ) { // If this is a category archive $userdata = get_userdatabylogin(get_query_var('author_name')); printf("<h2 class='pagetitle'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name); } else { echo("<h2 class='pagetitle'>No posts found.</h2>"); } get_search_form(); endif; ?> </div> </div> <?php get_sidebars('right'); ?> </div> </div> <?php get_footer(); ?> もし他のソースが必要でしたら言ってください。宜しくお願い致します。

    • ベストアンサー
    • PHP
  • CSSによるレイアウトが崩れてしまう現象について

    Adobe Dreamweaver CS4にて、ヘッダー、TOPメニュー、SIDEメニュー、コンテンツ、フッターというよくある構成でHPを作成しております。 レイアウトを組んでみたところ、Firefox4ではキチンと表示してくれるのですが、Internet Explorer6では、左メニューがやや右ズレをおこし、右のmainコンテンツが下に回りこんでしまうという現象となってレイアウトが崩れてしまいます。 もうひとつ、右mainの下の「株式会社●●」を右寄せに指定しているハズなんですが、どうしても左になってしまい、指定がきいてくれません。 この2つ原因がわからずに困っております。 お教えいただけませんでしょうか。よろしくお願い致します。 <body> <div id="page"> <!---ヘッダーここから-------------> <div id="header"> <div id="header_title"></div> <div id="header_info">TOPコメント…</div> </div> <!---ヘッダーここまで-------------> <!---TOPメニューここから----------> <div id="topmenu"> <ul> <li><a href="index.html">HOME</a></li> <li><a href="company.html">COMPANY</a></li> <li><a href="services.html">SERVICES</a></li> <li><a href="services.html">PRODUCTS</a></li> <li><a href="contact.html">CONTACTS</a></li> <li><a href="contact.html">help</a></li> </ul> </div> <!---TOPメニューここまで----------> <!---左メニューここから----------> <div id="left"> <div id="leftmenu"> <ul> <li><a href="index.html">Category1</a></li> <li><a href="company.html">Category2</a></li> <li><a href="company.html">Category3</a></li> <li><a href="company.html">Category4</a></li> </ul> </div> </div> <!---左メニューここまで----------> <!---メインここから--------------> <div id="main"> <div id="midashi"> <h2>CONTACTS</h2> </div> <div id="contents"> <p>&nbsp;</p> <p>サンプルテキスト、サンプルテキスト、サンプルテキスト、サンプルテキスト、サンプルテキスト、サンプルテキスト。 <br /> <br /> </p> <table width="500" bordercolor="#66CCCC" border="0" cellspacing="0" cellpadding="0"> <tr> <th bgcolor="#FFFFDF"> <p><span class="tx12pt_ore">サンプルテキスト。</span><br /> </p> <ul> <li>・サンプルテキスト</li> <li>・サンプルテキスト</li> <li>・サンプルテキスト<br /> </li> </ul></th> </tr> </table><br /> <br /> <span class="tx12pt_ore">【サンプルテキスト】</span><br /> <p>サンプルテキスト、サンプルテキスト、サンプルテキスト、サンプルテキスト、サンプルテキスト。 </p> <br /> <span class="txtright">株式会社●●</span> </div> <!---ページトップここから------------> <div id="pagetop_back"> <a href="#top"> <img src="../all_img/mpage-top.gif" alt="ページトップへ" width="100" height="20" border="0" /> </a> </div> <!---ページトップここまで------------> </div> <!---フッターここから------------> <div id="footer"> <div id="copyright"> <h3>このページは、株式会社●● が運営しています。<br /> Copyright(c) ~~~~Ltd Institute. All Rights Reserved. </h3> </div> <ul> <li><a href="#">サンプルメニュー1</a></li> <li><a href="#">サンプルメニュー2</a></li> <li><a href="#">サンプルメニュー3</a></li> </ul> </div> </div> <!---フッターここまで------------> </div> </body> ≪CSS≫ #page { width: 780px; margin-right: auto; margin-left: auto; background-image: url(all_img/page.gif); } #header { width: 740px; height: 80px; margin-right: auto; margin-left: auto; background-image: url(all_img/header.gif); } #topmenu { width: 740px; height: 40px; margin-right: auto; margin-left: auto; background-image: url(all_img/topmenuber.gif); background-repeat: no-repeat; } #left { width: 178px; height: 1300px; float: left; margin-left: 20px; background-image: url(all_img/sideback.gif); background-repeat: repeat; } #main { float: right; height: auto; padding: 0; background-color: #FFF; width: 560px; margin-top: 20px; margin-right: 20px; } #contents { width: 500px; height: auto; margin-left: 30px; } #contents .txtright { color: #033; text-align: right; } #footer { width: 740px; height: 80px; clear: both; margin-left: auto; margin-top: 0px; margin-right: auto; }

    • 締切済み
    • CSS

専門家に質問してみよう