現在「Fukasawa」テーマを使用しています。
http://www.andersnoren.se/themes/fukasawa/
テーマの編集にて
style.cssで記事一覧のタイトルや記事詳細画面のタイトルを小さくしたいです。
しかし、postheaderの
css
1/* Post header ----------------------------------------- */ 2 3 4.posts .featured-media + .post-header { margin-top: 16px; } 5 6.posts .post-title { 7 font-size: 1.25em; 8 line-height: 120%; 9 font-weight: 700; 10 color: #333; 11 word-break: break-word; 12 -ms-word-break: break-word; 13} 14 15.posts .post-title a { color: #333; } 16.posts .post-title a:hover { color: #019EBD; } 17
font-size: 1.25emを1pxや0.5emに変更したところで文字サイズが何も変更されません。
content.phpを見るかぎり、 <h2 class="post-title">と記載があるので、投稿のタイトルのclassはpost-titleという認識です。
php
1<div class="post-container"> 2 3 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 4 5 <?php if ( has_post_thumbnail() ) : ?> 6 7 <a class="featured-media" title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"> 8 9 <?php the_post_thumbnail('post-thumb'); ?> 10 11 </a> <!-- /featured-media --> 12 13 <?php endif; ?> 14 15 <?php 16 $post_title = get_the_title(); 17 if ( !empty( $post_title ) ) : 18 ?> 19 20 <div class="post-header"> 21 22 <h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> 23 24 </div> <!-- /post-header --> 25 26 <?php endif; ?> 27 28 <div class="post-excerpt"> 29 30 <?php /* the_excerpt(); */ ?> 31 32 </div> 33 34 <?php if ( empty( $post_title ) ) : ?> 35 36 <div class="posts-meta"> 37 38 <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_time(get_option('date_format')); ?></a> 39 40 </div> 41 42 <?php endif; ?> 43 44 </div> <!-- /post --> 45 46</div> <!-- /post-container -->
どなたか変更方法をご存知の方がいらっしゃればご教授いただけると幸いです。
宜しくお願いいたします。
-------追記-------
font-sizeを追加
css
1 2.posts .post-title a { 3 color: #333; 4 font-size: 1.5em; 5 6} 7.posts .post-title a:hover { 8color: #019EBD; 9font-size: 1.5em; 10}
font-sizeを0.5emへ変更
css
1/* Post header ----------------------------------------- */ 2 3 4.post.single .post-title { 5 font-size: 0.5em; 6 line-height: 120%; 7 font-weight: 700; 8 margin-bottom: 40px; 9 word-break: break-word; 10 -ms-word-break: break-word; 11} 12 13.post.single .post-title a { color: #333; } 14.post.single .post-title a:hover { color: #019EBD; } 15
回答1件
あなたの回答
tips
プレビュー