One of my divs is having the following rules applied, even though they are not in my CSS, javascript or inline HTML. The margin:0px
and padding:0px
are breaking the layout of the site and I need to override them. Adding margin:initial
and padding:initial
inline to the element in question does not work.
The actual HTML is below. The div in question is col-sm-4 col-sm-offset-1
.
<section class="section">
<div class="container">
<div class="row">
<div class="col-sm-4 col-sm-offset-1" style="">
<div id="ad-middle" class="panel panel-default" style="min-height:320px;">
<div class="panel-body" style="padding:0;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
<!-- AdSense Responsive -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="..."
data-ad-slot="..."
data-ad-format="rectangle"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div>
<div class="col-sm-6">
</div>
</div>
</div>
</section>
I am happy to edit the question and provide additional information and code, such as snippets from the CSS files, although they don't contain anything even close to the rules reported by the debugger.
Edit: I can confirm that it's the AdSense code that's altering the styling of the parent div. I have tried removing the AdSense code from inside the div, and that makes the margin:0
and padding:0
rules disappear. How do I override those rules?