Using iFrames:
The iframe tag in HTML is a very diverse tag, which is particuarly useful when coding layouts. It is used exactly the same as most tags, with the following syntax:
<iframe attribute1="value" attribute2="value"></iframe>
With this tag, it is very important that you close the tag straight away, as placing anything between the <iframe> and the </iframe> may cause unwanted problems, putting the layout into jeopardy. Below is a section of all of the attributes of the iframe tag:
align
Allows you to specify the allignment of your iframe in relation to the text. The allowed values are left, right, top, middle and bottom.
eg. <iframe align="top"></iframe>
frameborder
Allows you to specify whether your iframe has a border. The allowed values are 0 and 1.
eg. <iframe frameborder="1"></iframe>
width and height
Sets the height/width of your iframe. May use any number, and can be measured in percentage or pixels.
eg. <iframe width="100%"></iframe> or <iframe height="500"></iframe>
marginheight and marginwidth
Specify the margins on the vertical and horizontal of the iframe, in pixels.
eg. <iframe marginwidth="20"></iframe>
name
Sets a name for the iframe, used with the target attibute in the "a" tag for hyperlinks.
eg. <iframe name="navigator"></iframe>
scrolling
Allows you to define whether there are scrollbars on the frame. Yes means there always will be, No means there never will be, and Auto means that they appear depending on the width and height of the source page of the iframe.
eg. <iframe scrolling="auto"></iframe>
src
Defines where the content of the iframe is displayed from. Use with a URL.
eg. <iframe src="navigator.php"></iframe>
So, having used all that, a sample iframe could be:
<iframe name="content" width="300" height="500" frameborder="1" align="middle" marginwidth="20" marginheight="10" src="content.php" scrolling="auto></iframe>






Reply With Quote

