PDA

View Full Version : How do i use Iframes ...



pompey20
05-08-2005, 08:47 PM
Hey i have inserted an Iframe into my page for my Home page but i do not know how to create a second one so that when i click * staff * the Iframe would change to the staff frame.

Can anyone explain how to use them.

splintercell!
06-08-2005, 11:27 AM
Ok make your iframe like so:
<iframe src="URL OF PAGE HERE" width="400" height="100%" name="theodore" frameborder="0">Your browser dosent display iframes!</iframe>

Ok them all you do is make your link like so
<a href="staff.html" target="theodore">Staff</a>

JoeComins
06-08-2005, 11:37 AM
To start off with, open your HTML editor, such as notepade, FrontPage or Dreamweaver, and select where you would like to have IFrame.

In this space, type:


<iframe align="left / right / center" name="Insert the name of your IFrame here. This becomes important later" src="Insert the path to your file to automatically open" width=Insert size or percentage height=Insert size or percentage></iframe>

Note: Do not edit blue text. Only edit red

For example



<iframe align="center" name="main" src="body_index.html" frameborder=0 width=90% height=100%></iframe>


This above should have given you an IFrame box. Now, we need a content box. This is not done in the same way, as the links would only open in the navigation box, but we need it to open in the content box or "MAIN"

To do this:

Follow the same steps as above until you get to the codes. Instead, use the bottom ones below this

You need to set up the iframe as below:


<iframe align="left / right / center" name="Insert the name of your IFrame here. This becomes important later" src="Insert the path to your file to automatically open" width=Insert size or percentage height=Insert size or percentage></iframe>

Note: Do not edit blue text. Only edit red

For example



<iframe align="center" name="main" src="navigation.html" frameborder=0 width=40 height=200></iframe>


Now, you need to create a new page and insert the link where on the example it says navigation.html

Open this page.

For the links, you needto use this code below:



<a title="Insert the name of the page here" href="Add the name of the link here" target="Target this to the name you designated t the main conent IFrame">


Note: Edit the red, not the green

For Example


<a title="Home" href="body_index.html" target="main">



Optional Extras - These go just inside your tags with the height and width tags







frameborder=" " - Creates a default border around your IFrame. 1 is on 0 is off.


scrolling=" " - Want your IFrame to have scrolling capabilities? 1 is on 0 is off.


marginwidth=" " - Since the IFrame acts like a page it has margin settings as well. This adds margins to both sides of your IFrame.


marginheight=" " - Same as above except adds margins to top and bottom of IFrame.


vspace=" " - Similar to cellspacing, it leaves a gap on the tops and bottom of the IFrame.


hspace=" " - Similar to cellpadding, it leaves a gap on the sides of the IFrame.
allowtransparency=" " - This allows for transparency in the background.

This will then show up in the space designated in the navigation area. As you click a link, it will show up in the content box if this has been followed correctly, or if I havn't made a mistake

splintercell!
06-08-2005, 11:42 AM
who did you just copy out your tutorial "/

JoeComins
06-08-2005, 11:53 AM
ye, cos it tells him everything he needs

splintercell!
06-08-2005, 12:08 PM
notice how not one of your tutorials has ever been stikied..

JoeComins
06-08-2005, 12:45 PM
i only rote this one last night and this was the first one on this forum i wrote

splintercell!
06-08-2005, 03:56 PM
are you serious "/ youve written tons of pointless noobish ones..

Want to hide these adverts? Register an account for free!