---
title: "IE iFrame Insanity"
url: "/articles/ie-iframe-insanity"
type: article
date: 2010-02-09
updated: 2014-05-15
---

# IE iFrame Insanity

#  IE iFrame Insanity 

 By

 [  Karen Stevenson   ](/about/karen-stevenson) 

 February 9, 2010

  

After I spent THREE HOURS trying to figure out why IE insists on rendering a white background for an empty iframe, Nate pointed this little gem out to me.

IE has default values for iframes. Yes they do. And the default is to put an opaque background and an inset border on iframes that will ignore any attempt you make to change the iframe background color or border using css. So if you put 'background-color:transparent' into your css for the iframe element it will have no effect. That's right IT WILL IGNORE YOUR CSS!

To fix it you have to do this:

  ```

<iframe allowtransparency="true" frameBorder="0"></iframe>
  
```

See the documentation for this stupid behavior here

\- http://msdn.microsoft.com/en-us/library/ms533072%28VS.85%29.aspx  
\- http://msdn.microsoft.com/en-us/library/ms533770%28VS.85%29.aspx

 Published in:

- [  Front-end Development   ](/topics/frontend-development)

 

   You must have JavaScript enabled to use this form.

## Get in touch with us

### Tell us about your project. We'd love to hear from you!

 First Name  

 Last Name  

 Your email address  

 Your organization  

 How you heard about us  

 Tell us more 

     Leave this field blank