WP TablePress 罫線を表示させる方法
WP TablePress 罫線を表示させる方法
WP プラグイン TablePress の罫線は、WPテーマに依存します。
WPテーマがテーブルの罫線を薄く表示するように作られていると、TablePressの表の罫線も薄くなります。
ここでは、TablePressの罫線表示をTablePress機能にあるカスタムCSSを使い表示させます。
前提
WP プラグイン TablePresをインストール済み
方法
WP管理画面 左メニュー > TablePress > プラグインのオプション
カスタム CSS の入力箇所に下記をコピペ
/* すべてのセルに枠線を付加 */
.tablepress thead th,
.tablepress td {
border: 1px solid #000 !important;
padding: 1em;
margin: 1em;
}
.tablepress tbody tr {
}
.tablepress tfoot th {
background-color: #D3D3D3 !important; /* 背景色を指定 */
border: 1px solid #000 !important;
}
/* テーブルの外側(周囲)の余白を指定 */
.tablepress {
margin: 1em 1em;
}
/* テーブル全体の横幅の指定 ([table id=1 /])*/
.tablepress-id-1 {
width: 96%;
}