Frame Tutorial


People are always e-mailing me, asking me about how to do frames. This tutorial is my attempt to make a very in-depth explanation of frames that will be easy to understand. There are images on this picture for explanations so loading may take a will.



The site in the screen capture consists of four frames and five html pages. Whenever you are using frames you always have a basic code. The code for it looks like this.<*frameset framespacing="0" border="0" rows="120,*,40" frameborder="0"> When you want horizontal frames you say rows in the code. When you want vertical frames you say cols in the code. Then depending on how many frames you have you put in the code for the pages/frames.

<*frame name="top1" src="top.html" scrolling="no" border=0 marginwidth=0 marginheight=0 noresize>
<*frameset cols=*,107>
<*frame name="main" src="main.htm">
<*frame name="navigation" src="navigation.htm" scrolling="no" border=0 marginwidth=0 marginheight=0 noresize>
<*/frameset>
<*frame name="bottom" src="bottom.htm" scrolling="no" border=0 marginwidth=0 marginheight=0 noresize>

This code is how I did the layout you seen in the screen capture. Just make sure you take out the *. This would go on your index.html page. Since I have four different frames I have a code for each of them. Now let's look at the code. When you type for frameset cols or frameset rows you set the width for the frames. If you put a *, that means the page will expand to any width necessary. It's important you give each frame a name for certain reasons. You add the "scrolling=no, to page you don't want to move. When you have links in one window that you want to show up in another window use <*base target="framename"> The framename is whatever you named the frame in the html code on the index page.

Back to Help