frameborder attribute | frameBorder property
[This documentation is preliminary and is subject to change.]
Sets or retrieves whether to display a border for the frame.
Syntax
| HTML | <element frameborder="p" ... > |
|---|---|
| JavaScript | |
Property values
Type: String
1
-
Default. Inset border is drawn.
0
-
No border is drawn.
no
-
No border is drawn.
yes
-
Inset border is drawn.
Remarks
Invalid settings default to displaying borders.
Build date: 3/8/2012
frameborder is not in modern and future standards but can IE avoid its usage?
frameborder is not defined in XHTML1 Strict and seems that it won't be in HTML5.
IE8 can't render a no-border iframe with CSS only and without frameborder.
So IE8 is not fully XHTML1 Strict capable. Does it fixed in IE9?
IE8 can't render a no-border iframe with CSS only and without frameborder.
So IE8 is not fully XHTML1 Strict capable. Does it fixed in IE9?
- 4/18/2011
- Lacrymocéphale
Dynamic iframes
On dynamically created iframes, this property should be set before the iframe is attached to the document, otherwise it won't work
- 7/15/2010
- joarobles
Standard Information
As yes/no is not defined in the W3C spec, I DO recommend to add such info (be aware that yes/no is not the standard or so) in the standard information section.
- 7/15/2010
- takoratta
A work-around for the above.
Do iframe.outerHTML = iframe.outerHTML. It re-renders and the border is gone. Lame, but it works. In my case I was doing this before the iframe contained any content, so it wasn't too big a deal. This probably is not a viable solution if your iframe contains a lot of content.
- 2/19/2009
- Patyrn
Unreliable
This property not always works on dynamically created iframes. If you set this property to 0, “0” or “no” before the document is loaded, it works just as explained on the text above. However it seems like once the document is loaded you cannot do anything to get rid of the 3d border. If you use the debugger to trace the script you will notice the property is actually changed, but the change is not reflected on the screen.
- 7/4/2008
- george_5154
- 7/4/2008
- george_5154