Attribut align DOM HTML

Définition et utilisation

L'attribut align peut définir ou retourner comment aligner l'iframe selon le texte environnant.

Syntaxe

iframeObject.align=left|right|top|middle|bottom

Exemple

L'exemple suivant placera l'iframe à droite selon le texte entourant :

<html>
<body>
<iframe src="frame_a.htm" id="frame1"></iframe>
<p>Some text. Some text. Some text. Some text.</p>
<script type="text/javascript">
document.getElementById("frame1").align="right";
</script>
</body>
</html>