html – Remove border from IFrame

html – Remove border from IFrame

Add the frameBorder attribute (note the capital ‘B’).

So it would look like:

<iframe src=myURL width=300 height=300 frameBorder=0>Browser not compatible.</iframe>

After going mad trying to remove the border in IE7, I found that the frameBorder attribute is case sensitive.

You have to set the frameBorder attribute with a capital B.

<iframe frameBorder=0></iframe>

html – Remove border from IFrame

As per iframe documentation, frameBorder is deprecated and using the border CSS attribute is preferred:

<iframe src=test.html style=width: 100%; height: 400px; border: 0></iframe>
  • Note CSS border property does not achieve the desired results in IE6, 7 or 8.

Leave a Reply

Your email address will not be published.