How would I remove the border from an iframe embedded in my web app? An example of the iframe is:
<iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>
I would like the transition from the content on my page to the contents of the iframe to be seamless, assuming the background colors are consistent. The target browser is IE6 only and unfortunately solutions for others will not help.
Add the
frameBorder
attribute (note the capital ‘B’).So it would look like:
You can use
style="border:0;"
in your iframe code. That is the recommended way to remove border in HTML5.Check out my html5 iframe generator tool to customize your iframe without editing code.
Works with Firefox ;)
If the doctype of the page you are placing the iframe on is HTML5 then you can use the
seamless
attribute like so:Mozilla docs on the seamless attribute
Either add the frameBorder attribute, or use style with border-width 0px;, or set border style equal to none.
use any one from below 3: