Take the 2-minute tour ×

I have been building a forum using mybb. I have used Adsense to incorporate a couple of advertisements into the site but they are not displaying correctly in IE8. They look fine in IE10 (and IE8 when in compatibility mode), Chrome and Firefox. The issue is that the advertisements in IE8 appear to be misaligned by 1 or 2 pixels.

In development mode, I have identifed a line which I believe is created by Adsense as it's not part of my original code, which appears to cause the issue.

It is display: inline-table. If I uncheck this, the ads on the site appear aligned with the content. But as this is a dynamically created bit of code, I can't edit it... (or can I?)

Can anyone help me resolve this issue and get my advertisements in line with the rest of my content?


The code I get from Google Adsense is:

<!-- ShowThreadSideSquare -->
<ins class="adsbygoogle"

When I look at it through the development screen in IE, it has expanded to much more, but this is the line with the inline-table comment which seems to make it unaligned in IE8. But I can't seem to edit it as it's not in my source code...

<ins style="width: 200px; 
          height: 200px; 
          padding-top: 0px; 
          padding-right: 0px; 
          padding-bottom: 0px; 
          padding-left: 0px; 
          margin-top: 0px; 
          margin-right: 0px; 
          margin-bottom: 0px; 
          margin-left: 0px; 
          border-top-color: currentColor; 
          border-right-color: currentColor; 
          border-bottom-color: currentColor; 
          border-left-color: currentColor; 
          border-top-width: medium; 
          border-right-width: medium; 
          border-bottom-width: medium; 
          border-left-width: medium; 
          border-top-style: none; 
          border-right-style: none; 
          border-bottom-style: none; 
          border-left-style: none; 
          display: inline-table; 
          visibility: visible; 
          position: relative;">
share|improve this question
can you show us a little bit of the code that creates the advertisements please –  Malachi Oct 11 '13 at 17:03
I've added the code above, thanks –  user2871793 Oct 11 '13 at 18:32
The new version use inline-block for responsive Ad. In Ie8, this shows very bad. Looking for a solution. The code is in Div but no use. Overflow:hidden on <ins> can save by not making page littered. –  Satya Prakash Dec 12 '13 at 19:05
add comment

1 Answer

what I would do to fix this is take the code and put it inside of a div and add styling to the div so that the div will align. it should separate the code enough to make it align itself.

if you provide a JSFiddle I might be able to help you more, but I think you have the general idea.

share|improve this answer
add comment

Your Answer


