Borderless IFRAME

Google’s adsense code is a bunch of javascript which actually generates an iframe. However, the adsense region doesn’t appear to be part of a separate iframe. It looks part of the overall page being viewed well integrated into it. I was trying to get a similar effect. It worked in Firefox but IE was always rendering the iframe with a bevelled edge border. So, after a bit of searching, found that the trick is to add style=”border:0″ to the body element of the url that the iframe renders (not the body of the page containing the iframe). I did this and it worked like a charm.


Filed under Tech - Tips

7 responses to “Borderless IFRAME

  1. brose

    Thanks, just what i needed!

  2. Great one! but not working with IE7.0

  3. S

    It works for me in IE7.0 as well.

  4. S

    Funny, I myself was trying it again today and had issues in IE. In the iframe element, you also need to add frameborder=0

  5. luis

    Fantastic!!! Thanks.
    By the way… it works with IE 8.0 too!

  6. Bjorn

    Cool! thnx man 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s