投稿記事だけ,hタグ(見出し)の背景画像を変更するためのCSS
-
投稿記事だけ,hタグ(見出し)の背景画像を変更するためのCSSの書き方を教えていただけますでしょうか。
#content .post h3{ }
かなと思ったのですが,ちがいました。
single.phpの内容は以下のようになっています。よろしくお願いいたします。<?php get_header(); ?> <div id="main"> <div id="pankuzu"><a href="<?php echo get_option('home'); ?>/">Home</a> » <?php the_category(', ') ?> » <strong><?php the_title(); ?></strong></div> <div id="content"> <div class="box_out"> <div class="box_in"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="mokuji"> <h2><?php the_title();?><span><?php bloginfo('name'); ?></span></h2> <div id="date">category : <?php the_category(', '); ?> <?php the_time('Y.n.j'); ?> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?></div></div> <?php the_content(); ?> <br clear="all"> <div id="next"> <?php previous_post_link('←「%link」前の記事へ '); ?> <?php next_post_link(' 次の記事へ「%link」→'); ?> </div> <?php endwhile; else: ?> <?php endif; ?> <div id="next"> <?php $ref = $_SERVER['HTTP_REFERER']; // リファラ値を変数に格納 $text = "前のページへ戻る"; $text2 = "前のページにはブラウザの『戻る』でお戻りください。"; if(isset($ref)){ // リファラ値があれば<a>タグ内へ echo '<a href="'.$ref.'">'.$text."</a>"; } else{ // リファラ値がない場合 echo $text2; } ?> </div> </div></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「投稿記事だけ,hタグ(見出し)の背景画像を変更するためのCSS」には新たに返信することはできません。