Google Adsense Ad Doesn't Stay Inside <td>

Hi all. I’m having some trouble with an Adsense ad. It doesn’t seem to want to stay inside my . It seems to be floating outside of it to the right. Any thoughts on why this may be happening? See http://comparewear.com/wearables/

Thanks!

It’s kind of hard to know what is going wrong with just a screenshot. Do you have a link to the live site, or the code that we could take a look at?

Sorry, I could have sworn I had a link.

Edit: Looks there’s a bug in this forum software. I typed < td > without the spaces, and this plus everything afterwards won’t display, and I get an error when I try to fix it as well. The original post was:

_Hi all. I’m having some trouble with an Adsense ad. It doesn’t seem to want to stay inside my < td >. It seems to be floating outside of it to the right. Any thoughts on why this may be happening? See http://comparewear.com/wearables/_

Thanks!

To type an HTML string inline, preceed the less-than symbol (the first character) with a single backtick and follow the greater-than symbol (the last character) with another backtick. There can be no spaces between the backticks and the characters.

Like this:   `<td>`

If you wish to post a block of code, preceed the block with three backticks on a line by themselves, then end the block with three more backticks on a line by themselves. Like this:

```
your block of code here
```

or you can highlight the block of code and click the </> symbol from the editor menu.

Thanks. My original question is about my website, though. Not this one :wink:

Your cell is only 820px wide but you have inserted an iframe which is 1120px wide and inside that iframe you have another iframe that is also 1120px wide so the 720px ad is centred within the nested iframe and thus overflows the cell.

You need to check your add code and get the 720px ad inside a 720px iframe as you can’t change the nested iframe dimensions via css.

It’s Google Adsense responsive ad code. The iframes are being generated client side. I imagine it’s possible that the responsive ads are being sized before the template fully loads. But I can’t be the only one who has had this problem with Adsense :frowning:

Are you using the auto format method mentioned here?

Yes.

I don’t think it will help with this issue but your 2 table-column cells really should have a parent of display:table with a width of 100% otherwise the cells won’t know how wide they are until content arrives.

#main_columns_container {
    display: table;
    width: 100%;
}

Thanks! Oversight as I have been recoding.

Also, I found in the Adsense documentation that a container width must be defined.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.