Abe Miessler
Abe Miessler

Reputation: 85096

Styling iframes in IE8?

Say I have the following code:

<style>
iframe
{
    border:none;
}
div
{
    border: 1px solid;
    padding: 10px;
}
</style>
<div>
   <iframe></iframe>
</div>

If I view this in any modern browser there is no border around the iframe. But If I view it using IE8 or 7 then the border remains. How can I make the border disappear for older, crappier browsers?

I am also having a few other styling issues with the iframe, so bonus points for anyone can provide a good link that goes over cross browser styling of iframes.

Upvotes: 1

Views: 108

Answers (1)

Marc Lloyd
Marc Lloyd

Reputation: 304

You need to add the following to the iFrame. It's can't be done with just CSS for older browsers:

frameborder="0"

Upvotes: 5

Related Questions