2007年7月7日

新しいサイト”わーどぷれすっ!”をオープンしました。

今後はWordPress関連の話題は全部このサイトに投稿していきます。プラグイン一覧もこの新サイトに移しましたので、ドウゾよろしくお願いします。

WordPress テーマの詳説:第一章

Registry First Aid will find these invalid entries and remove them from your registry. With Registry First Aid, your Windows registry will be always clean and correct, helping your programs load faster and speeding up your computer. Fast, easy to use, PC speed testing and benchmarking. PassMark PerformanceTest allows you to objectively benchmark a x blades keygen PC using a variety of different speed tests and compare the results to other computers. Twenty-eight standard benchmark tests are available in six test suites plus there are seven advanced testing windows for custom benchmarking. In addition to the standard tests, there are 7 summary results plus the overall PassMark Rating result. The benchmark results are xilisoft keygen presented as easy to read bar charts so that you dont need to spend hours studying the number to know the result. Timing for the tests is done using high resolution timers, which are accurate to approximately 1 millionth of a second on most PCs. Create professional-quality advertising, sophisticated print designs and electronic documents with PagePlus sims 2 keygen X5, the best-in-class desktop publisher.

デザインの選択

沢山のコードの中でウェブサイトを見失う前に、何か実践的なことをしてみよう。いまのところ、私たちのサイトには一番上にタイトルがあり、真ん中に投稿、下にサイドバー、その下にフッターがある。スタイルを取り除くと自動的に可変幅のデザインになる。というわけで、こうした各部分を自分のサイト用にアレンジしなくてはならない。このガイドでは標準的な2列レイアウトを作成していく:

Layout

このデザインをスクリーン上に実現させるためには、いうまでも無いが、サイドバーを右側に移動させなければならない。

Current layout

サイドバー

このサイドバーの中身はsidebar.phpファイルにある。このファイルをのぞいてみるとたくさんのコードが有るが、次のもの以外は無視してよい:

	<div id=”sidebar”>
        … sidebar code …
	</div>

ID「sidebar」を持った一つのdivセクションにすべてがきれいに収まっている。これこそが必要なもので、sidebar.php内のコードを一行たりとも触らずに、CSSファイルに適切なスタイルを追加するだけでサイドバーの外観を変更することができる。

ではstyle.cssを編集してヘッダーの次に次のスタイルを追加してみよう:

1

2
3
	
#sidebar
{
  float: right;
  width: 190px;
}

これを三つに分けてみる

  1. #sidebar‘ – これはこのスタイルが、サイドバーのIDを持った要素のためのものであることをブラウザに伝える(「.sidebar」ならサイドバーのクラスを意味する)
  2. float: right‘ – これは画面右側にサイドバーを「float」させる(浮かせる)。左側に浮かせたければ「left」を同じように使うことができる。
  3. width: 190px‘ – 可変幅のデザインではあるがサイドバーのサイズは変更させたくない。これはサイドバーの幅を190ピクセルに固定する(好みに合わせて変更すると良い)
This entry was posted in WordPress, WP ヒント. Bookmark the permalink.

7 Responses to WordPress テーマの詳説:第一章

  1. Pingback: UrbanGiraffe » Japanese translation

  2. Pingback: Standing Tall

  3. Pingback: WordPress導入レポ・テーマ | 12-09.net

  4. Pingback: テーマ作成、修正の参考和訳ページ | setting_web

  5. Pingback: がじゅまろの樹» ブログアーカイブ » 必須情報は忘れるためにある

  6. Pingback: WordPressのオリジナルテンプレートを自作するのに役立つページ。 - 空が好きな人のメモ帳

  7. Pingback: WordPressのテーマ « Logs

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>