Frames/Iframes

Frames/Iframes are very easy once you get the hang of it, they basically make it easier for the webmaster to update their site without having the hassle or editing every single page. Don't get me wrong, some people prefer not to use frames in their layouts, but it sure is a lot easier on everyone if frames were used.

Remember the layout from the Tables tutorial? If not, here's what it looks like:

We are going to put frames into this layout so that all the pages will open up in the middle section of the layout.

First, make a page called 'index.html'. This will be your main page. Then create a page called 'home.html'. This will be the page that shows up in the middle every time you view 'index.html'. Now copy and paste the Table layout to put in 'index.html'.

Now in the part that says The content of the page will be displayed here, remove those words and replace it with the following code:

<center><iframe name="main" src="home.html" frameborder="0" width="400" height="###"></iframe></center> To get some of these things clear, below is a list definitions: After you have added the iframe code to your tables layout, you have to add the target tag to every link you want to open up in the middle. You can do this by making your link tags look like this: <a href="link.html" target="main">Link</a> See how the link is now targeted to the name of the iframe?

This will now allow you more flexibility when you change your links or update your affiliates because you will only have to edit the index page and nothing else.

Just to note, all the pages you want shown in the middle section of the layout must not have the layout on the index page. That will just screw up the whole layout. Instead, only use the CSS in the index layout, or use a CSS stylesheet, and leave the main pages with a white background to match with the middle section of the table layout.

~Jen