前提・実現したいこと
GoogleAdsenseのディスプレイ広告(レスポンシブ)を導入しようとしています。
自動生成されたコードをそのまま貼り付けると、なぜか下部に無駄なパディングが発生してしまうため、
これを削除したいです。
該当のソースコード
html
1<div class="ads_content"> 2 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 3 <!-- index-display-unit --> 4 <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-000000000000" 5 data-ad-slot="000000000000" data-ad-format="auto" data-full-width-responsive="true"></ins> 6 <script> 7 (adsbygoogle = window.adsbygoogle || []).push({}); 8 </script> 9</div>
css
1div { 2 padding: 0; 3 border: 0; 4 font: inherit; 5 font-size: 100%; 6 vertical-align: baseline; 7} 8 9.ads_content { 10 margin: 20px 0 0 0; 11 background: #f7f7f7; 12 border-top: solid 1px #bebebe; 13 border-bottom: solid 1px #bebebe; 14}
試したこと
ins
タグをstyle="display:block;padding:0"
としましたが、特に変化は見られませんでした。
補足情報(FW/ツールのバージョンなど)
必要な情報がありましたらすぐに用意させていただきます。
何卒よろしくお願いいたします。
あなたの回答
tips
プレビュー