margin: ***;

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O

The margin property sets the margins around an element.

The margins of the iframe can be set by applying this property to the IFRAME element.


#example {
margin: 5px;
}

Property Value Explanation
margin length, %, or auto the top, bottom, left, and right margins

Example

The right and bottom margins : 20px

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

<style type="text/css">

#example { width: 100%; }

#example iframe {
width: 200px;
height: 100px;
float: left;
margin: 0 20px 20px 0;
}

</style>

</head>
<body>

<div id="example">

<iframe src="example.html">Alternate content</iframe>
<p>
Some text Some text.<br>
Some text Some text ...
</p>

</div>

</body>
</html>

Output

Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.
Some text Some text.