iframe border


border: ***;

Browser
Internet Explorer Firefox Opera

The border property sets the border of an element.

The border of the iframe can be specified by applying this property to the IFRAME element.


iframe {
border: 2px red solid;
}


Property Value Explanation
border each value sets width, color, and style

border: 2px red solid;

border: 2px red solid ;
border- width color style

Screen shots of examples

iframe { border: 2px red solid; }

MSIE 7 Firefox 1 Opera 9
MSIE Firefox Opera

In MSIE, the default border is displayed around the iframe at the same time. If you doesn't want to display this default border, specify the frameborder attribute for the IFAME element.

<iframe src="example.html" frameborder="0"></iframe>

MSIE (MSIE 7)


Example

<html>
<head>
<title>TAG index</title>

<style type="text/css">

iframe {
width: 300px;
height: 100px;
}

#example1 { border: none; }
#example2 { border: 1px green solid; }
#example3 { border: 2px green dashed; }

</style>

</head>
<body>

<p><iframe src="example.html" id="example1">Alternate content</iframe></p>

<p><iframe src="example.html" frameborder="0" id="example2">Alternate content</iframe></p>

<p><iframe src="example.html" frameborder="0" id="example3">Alternate content</iframe></p>

</body>
</html>
Output