はてなダイアリーの構造
はてなダイアリーのページの構造は、大雑把には以下のようになっている。
<body> | |||||||||||||||||||||||||||||
#simple-header | |||||||||||||||||||||||||||||
<h1>日記のタイトル</h1> | |||||||||||||||||||||||||||||
.hatena-body
| |||||||||||||||||||||||||||||
タグで始まっているものはタグになっている。"." で始まっているものは class である。"#" で始まっているものは id である。
ちなみに、sidebar を sidebar らしくさせるために、例えば以下のようなスタイルを適用させる必要がある。
div.hatena-body { margin: 20px; position: relative; clear: both; *width: 100%; } div.main { margin: 0 240px 20px 0; } div.sidebar { margin: 0 0 20px 0; position: absolute; width: 210px; top: 0; right: 0; }