「MediaWiki:Common.css」の版間の差分
表示
編集の要約なし |
編集の要約なし |
||
| 1行目: | 1行目: | ||
/* 1. | /* 1. ロゴ、検索、個人設定が含まれる「ヘッダー全体」から広告を排除 */ | ||
#mw-head ins.adsbygoogle, | #mw-head ins.adsbygoogle, | ||
#mw-navigation ins.adsbygoogle, | #mw-navigation ins.adsbygoogle, | ||
#p-logo ins.adsbygoogle, | #p-logo ins.adsbygoogle, | ||
. | #p-search ins.adsbygoogle, | ||
#p-personal ins.adsbygoogle { | |||
display: none !important; | display: none !important; | ||
visibility: hidden !important; | |||
height: 0 !important; | |||
} | } | ||
/* | /* 2. 要素に「被さる」ように浮いている広告を強制非表示 */ | ||
. | ins.adsbygoogle[data-ad-status="filled"] { | ||
margin-top: 0 !important; | |||
margin-bottom: 0 !important; | |||
} | |||
/* 3. ヘッダーエリアの中に無理やり作られた隙間をリセット */ | |||
#mw-head { | |||
height: auto !important; | |||
z-index: 100 !important; /* Wikiのヘッダーを広告より前面に出す */ | |||
} | |||
/* 4. もし「ページ最上部」に居座っているなら、その枠ごと消す */ | |||
body > ins.adsbygoogle { | |||
display: none !important; | display: none !important; | ||
} | } | ||
2026年2月18日 (水) 14:09時点における版
/* 1. ロゴ、検索、個人設定が含まれる「ヘッダー全体」から広告を排除 */
#mw-head ins.adsbygoogle,
#mw-navigation ins.adsbygoogle,
#p-logo ins.adsbygoogle,
#p-search ins.adsbygoogle,
#p-personal ins.adsbygoogle {
display: none !important;
visibility: hidden !important;
height: 0 !important;
}
/* 2. 要素に「被さる」ように浮いている広告を強制非表示 */
ins.adsbygoogle[data-ad-status="filled"] {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
/* 3. ヘッダーエリアの中に無理やり作られた隙間をリセット */
#mw-head {
height: auto !important;
z-index: 100 !important; /* Wikiのヘッダーを広告より前面に出す */
}
/* 4. もし「ページ最上部」に居座っているなら、その枠ごと消す */
body > ins.adsbygoogle {
display: none !important;
}