CSSでテーブルを作りました。(下記CSS)
p の marginを変更したいのですが、テーブルの中の td.tdtext 内のpだけに反映させる方法はありますでしょうか?
このテーブル内の p だけ margin指定をしたいということです。
全体の p の指定方法と td.tdtext 指定方法はわかるのですが、上記に関して自力では方法が見つけられなかったためご質問させていただきます。
どなたか知恵をお貸しください。
どうぞ宜しくお願い致します。
【テキスト】 <table class="centertext" style="border: none;"> <tbody> <tr> <td class="tdside"><img class="aligncenter wp-image-1355" src="http://aaa" /></td> <td class="tdtext"> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> <p>あああ</p> </td> <td class="tdside"><img class="aligncenter wp-image-1356" src="http://あああ" /></td> </tr> </tbody> </table> 【CSS】 table.centertext { width: 100%; } td.tdside { width: 20%; vertical-align: bottom; text-align: center; border: none; } td.tdtext { vertical-align: bottom; text-align: center; border: none; font-family: '游ゴシック', 'Yu Gothic', sans-serif !important; font-size: 24px; }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/04 09:43