[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
p.postinfo a {color: #0c8bcd}
03. 記事本文のデザインを指定する
div.post p {
font-size: 0.875em;
line-height: 1.6;
margin-top: 10px;
}
04. 全体の横幅を指定
/* コンテナ */
div#container {
width: 760px;
margin: auto;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>;charset=<?php bloginfo ('charset'); ?>" />
<title><?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo ('stylesheet_url'); ?>" type="text/css" />
</head>
<body>
<!-- コンテナ -->
<div id="container">
<!-- ヘッダー -->
<div id="header">
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h1>
<p id="desc"><?php bloginfo('description'); ?></p>
</div>
<!-- コンテンツ -->
<div id="content">
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
</div>
</div>
</body>
</html>
/* ヘッダー */
div#header h1 {
font-size: 1.875em;
margin: 0;
}
div#header h1 a {
text-decoration: none;
color: #000000;
}
div#header p#desc {
font-size: 0.75em;
color: #444444;
margin: 0;
}
div#header {
border-bottom: solid 5px #a3d2f2;
padding-bottom: 10px;
margin-bottom: 20px;
}