Mitzrah's Get IT Right Column!! Frame Creation Basics Updated : Saturday, August 01, 1998 |
![]() |
Dear Homesteaders!
In order to create frames, you need to keep in mind that a parent file (index.html) will call up 2 or more files (navbar.html & main.html) Basically speaking, index.html will split up into 2 frames, the frame on the left will load up navbar.html and the frame on the right will support main.html. In pictorial form:
|------------index.html---------| | ||
|
The following HTML codes will help you create a frame of medium complexity. It will have
Try saving this HTML file as test.html, create 2 files called file2.htm and file3.htm they could contain anything you like or use 2 exisitng files of your own. Always remember that you can PREVIEW your work with your browser. How do you do that? You open your browser and then under the "file" menu, you choose "Open Page" or just press CTRL + O and the browser will ask you where is the file you want to open located on your hard disk.
<HTML>
<HEAD>
</head>
<frameset rows="25%,50%,25%">
<frame src="file1.htm">
<frameset cols="25%,75%">
<frame src="file2.htm">
<frame src="file3.htm">
</frameset>
<frame src="file4.htm">
</frameset>
</html>
Please click here to see a sample of what the frame above will look like!
Here is some information to digest:
The FRAMESET container: | Frames are contained in a structure called a FRAMESET, which takes
the place of the body container on a frames formatted page. An HTML document which
contains a FRAMESET definition has no BODY section in its HTML code, and a page with a
BODY section cannot use the FRAMESET tag.
|
||||||
ROWS and COLS | The FRAMESET tag has two important attributes, which are the ROWS
and COLS tags. This is an example of a generic FRAMESET container:
You must define a resonable number of ROWS or COLS or both. If you do not do this, the browser will not load your frames and will ignore your FRAMES ompletely. The "specification" in the generic FRAMESET line is a comma separated list of values which can be expressed as follows: Division into percentages: <frameset rows="25%,50%,25%"> Division into pixels: <frameset rows="100,240,140"> Proportioned : <frameset rows="*,2*,3*"> Or mixed : <frameset rows="10%,240,*"> If you use a FRAMESET with both COLS and ROWS attributes, it will create a grid of frames, like for example: <FRAMESET ROWS="*,2*,*" COLS="2*,*"> The line above will create a frame grid with 3 rows and 2 columns. And it will look something like this:
|
||||||
<FRAME> TAG | The frame tag defines a single frame, it must be put within
FRAMESET tags like so: <FRAMESET ROWS="*,2*"> The FRAME tag has 6 associated attributes, they are: SRC, NAME, MARGINWIDTH, MARGINHEIGHT, SCROLLING and NORESIZE. This is an example of a complete generic FRAME tag: <FRAME SRC="url" NAME="window_name" SCROLLING="YES|NO|AUTO" MARGINWIDTH="number" MARGINHEIGHT="number" NORESIZE"> |
||||||
Calling up a FRAME source | The most important FRAME attribute is SRC, what this attribute does
is call up a source file or URL to be loaded up in that frame. It could be a file residing
on your directory or it could point elsewhere. Here are some examples:
|
||||||
What if a visitor who cannot support frames show up? | You can do this by virtue of the <NOFRAMES></NOFRAMES>
tags. And they should look like this. <NOFRAMES> For example: <NOFRAMES> |
[ Emiri Nakayama | Sailor Mars, Rei | About Me | Photo Gallery ] |
![]() |
![]() |
LinkExchange Member | Free Home Pages at GeoCities |