サイト内検索
背景色を設定した際の上下左右に余白について | CSSカスタマイズ相談 | Cocoon フォーラム

Topic starter2022年6月5日 10:27
はじめまして。様々調べたのですが解決できず、書き込みさせていただきました。
よろしくお願いします。
メイン部分に背景色を設定したいのですが、上下左右に白い余白ができてしまいます。
余白部分までいっぱいに背景色を設定したい思っています。
-------------------------------------------------------------------------------------------
不具合・カスタマイズ対象ページのURL: https://purofu.net/test2/
解決のために試したこと:
★調べて下記を追加CSSに記載しています
#main {
margin-top: 0;
}
.content {
margin-top: 0;
}
.article h1 {
margin-top: 0!important;
padding-top: 0;
}
.header {
margin-top: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
.footer {
margin-top: 0;
}
環境情報:
----------------------------------------------
コンテンツURL:/wp-content
インクルードURL:/wp-includes/
テンプレートURL:/wp-content/themes/cocoon-master
スタイルシートURL:/wp-content/themes/cocoon-child-master
親テーマスタイル:/wp-content/themes/cocoon-master/style.css
子テーマスタイル:/wp-content/themes/cocoon-child-master/style.css
WordPressバージョン:6.0
PHPバージョン:7.4.28
ブラウザ:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36
サーバーソフト:Apache
サーバープロトコル:HTTP/1.1
言語:ja,en-US;q=0.9,en;q=0.8
----------------------------------------------
テーマ名:Cocoon
バージョン:2.3.7.1
カテゴリ数:1
タグ数:0
ユーザー数:1
----------------------------------------------
子テーマ名:Cocoon Child
バージョン:1.1.3
style.cssサイズ:845バイト
functions.phpサイズ:203バイト
----------------------------------------------
Gutenberg:1
AMP:0
PWA:0
Font Awesome:4
Auto Post Thumbnail:0
Retina:0
ホームイメージ:
----------------------------------------------
ブラウザキャッシュ有効化:0
HTML縮小化:0
CSS縮小化:0
JavaScript縮小化:0
Lazy Load:0
WEBフォントLazy Load:0
----------------------------------------------
利用中のプラグイン:
Intuitive Custom Post Order 3.1.3
MetaSlider 3.24.0
PublishPress Future 2.7.3
Shortcodes Ultimate 5.12.0
----------------------------------------------
This topic was modified 1か月前 2回 by oomatsu
2022年6月5日 12:31
前略、oomatsuさん
編集ページのカスタムCSSに記述されている、
.change-area { background: #3399FF; }
を、
#main { background-color: #39f; }
にすると、どうでしょうか?
わいひら 件のいいね!