View Full Version : Iframe border problems in Fire Fox
FrickenTrevor
12-16-2009, 02:36 AM
So I have an iframe that the border is set to "0".
Works fine in IE, but Fire Fox keeps puting a border around the iframe even when border="0". Is there any way I can have no border AT ALL?
jscheuer1
12-16-2009, 02:42 AM
The 'border' may be arising from something else. To tell for sure, we would need a link to the page:
Please post a link to the page on your site that contains the problematic code so we can check it out.
However, you could try:
<iframe style="border: none;" . . . ></iframe>
FrickenTrevor
12-16-2009, 03:19 AM
The style that you put in works, thanks!
X96 Web Design
12-22-2009, 07:37 AM
Just for future reference, always make things work in Firefox before you do anything with IE... Just as a general rule.
// X96 \\
jscheuer1
12-22-2009, 09:30 AM
As a side note, frameborder (which will work in all browsers) is the correct attribute for controlling the border of an iframe, not border. It's valid values are 0 or 1. For all other border effects for iframe, use style. Since the default frameborder is 1, that explains what Firefox was doing. Style should always override any corresponding attribute value though, so it is generally safer and easier to go right to style.
Since iframe is being deprecated, unless that changes, it is unlikely that the non-standard border attribute will be dropped in IE, though it may already have been in IE 8. I may check at some point. Doesn't seem to be a priority, as IE will respond correctly to the border style or to the frameborder attribute.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.