解決したいこと
ワードプレスで自作テーマを作っているphp初心者です
pタグの部分を囲い装飾したいのですが、なぜかこの部分だけcssが効きません。他の部分で実験しましたが反映できているようです。
調べたことなど
cookieとcashは初期化しました
コード
stylesheet
body { background-color: rgb(247, 246, 242); text-align: center; background-image: url(); background-position: center; background-repeat: no-repeat; background-size: cover; } h1 { font-size: 65px; font-family: 'Shippori Mincho', serif; font-style: normal; font-weight:600; margin: 0; } h2 { font-size: 40px; border-bottom: solid #3c3e4075 3px; } ul, ol { background: #fcfcfc;/*背景色*/ padding: 0.5em 0.5em 0.5em 2em;/*ボックス内の余白*/ border: solid 3px gray;/*線の種類 太さ 色*/ } ul li, ol li { line-height: 1.5; /*文の行高*/ padding: 0.5em 0; /*前後の文との余白*/ } /********タイトルと大見出しとサムネ********/ .headerTitle-wrapper { margin-top:30px; margin-left: 30px; margin-right: 30px; padding-bottom:5px ; border-bottom: black solid 1px; } .title-p { background-color: black; color: white; margin:10px auto 0 ; } .thumbnail { text-align: center; } .thumbnail-image { width:30%; height: auto; } /************************前文*************************/ //問題があると思われる部分// .preamble{ padding: 1rem 2rem; border: 6px double #000; } /* ここから本編 */ .contents-wrapper { width:85%; margin: 0 auto; } .h2-head { margin-top:50px; padding: 0.25em 0.5em;/*上下 左右の余白*/ color: rgb(247, 246, 242);/*文字色*/ background: rgb(27, 27, 27);/*背景透明に*/ border-left: solid 8px #98f52d;/*左線*/ font-size: 30px; text-align: left; } .block1-contents { height: 400px; } /*フッター*/ .footer-wrapper { width:100%; height: 200px; margin-top:50px; background-color:#393732; }
single.php
<?php get_header("thesis");?> <section class="contents"> <div class="contents-wrapper"> <div class="contentsText"> <!--題名--> <h2><?php the_title(); ?></h2> </div> <div class="thumbnail"> <!--サムネイル--> <img class="thumbnail-image" src="<?php echo get_template_directory_uri();?>/images/resercher.png"> </div> //問題があると思われる部分// <p class="preamble"> テキストストテテキストテキキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテストテキストテキスト </p> <div class="block1-middleHeading"> <h2 class="h2-head">1. テキストテキストテキスト</h2> <div class="block1-contents"> テキストテキストテキスト </div> </div> <div class="block1-middleHeading"> <h2 class="h2-head">2. テキストテキストテキスト</h2> <div class="block1-contents"> テキストテキストテキスト </div> </div> <?php the_content();?> </div> </section> <?php get_footer(); ?>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。