margins in the iframe


<iframe src="" marginwidth="" marginheight="">

Browser
Internet Explorer Firefox Opera
Type
Inline-block

The marginwidth and marginheight attributes of the IFRAME element specifies the margins in the iframe.


<iframe src="example.html" marginwidth="10" marginheight="10"> - </iframe>


Attribute Value Explanation
marginwidth=" " pixels the left and right margins in the iframe
marginheight=" " pixels the top and bottom margins in the iframe
Tips and Notes

This can be specified with CSS. Please see the "Related Document" for details on CSS.


Example

<p>
Default
<br>
<iframe src="iexample_k.html" width="300" height="100">サンプル</iframe>
</p>

<p>
The margins on all sides : 30px
<br>
<iframe src="iexample_k.html" width="300" height="100" marginwidth="30" marginheight="30">Alternate content</iframe>
</p>

<p>
The margins on all sides : 0
<br>
<iframe src="iexample_k.html" width="300" height="100" marginwidth="0" marginheight="0">Alternate content</iframe>
</p>
Output

Default

The margins on all sides : 30px

The margins on all sides : 0