Frames
Here's a explanation of how frames work and how to use them.
There are three basic tags used in making frames:
<FRAMESET>
<FRAME SRC='">
<NOFRAMES>
Don't let this confuse you. It all becomes clear
later. The frameset and frame tags are used together to tell a browser
how to load a page.
Frameset
Frameset is used to tell a browser how much space each frame(window)
is to take up. You can use the frameset to
create rows or columns. Here's some examples.
Colums
This one will do 2 columns, the left one will be 100 pixels, and the right one will be 200 pixels wide.
<frameset cols="100,200">
<frame src="1.html">
<frame src="2.html">
</frameset>
This is the way i recommend doing frames. Using percentage. That way
if anyone is still using 640x480 they will see
the frames the same way anyone else would. I'm using 800x600. With this
the left frame will use 70% of the screen
and the * will tell right frame to use what's left.
<frameset cols="70%,*">
<frame src="1.html">
<frame src="2.html">
</frameset>
Rows
This will do 2 rows, the top frame will be 75% of the page and the bottom
frame will be 25% of the frame. Instead
of specifying the 25% you can use the wildcard (*). Or you could the wildcard
with the 75% and specify the 25%.
<frameset rows="75%,25%">
<frame src="1.html">
<frame src="2.html">
</frameset>
This will do the picles, the top frame will be 200 pxiles and the bottom frame will use whatever pixles are left.
<frameset rows="200,*">
<frame src="1.html">
<frame src="2.html">
</frameset>
Theoretically you could put as many frames on a page as you want but,
you must remember the more frames
the longer it takes to load a page. Below is an example of how to put rows
and cloumns on the same page. The
frameset creates a column 30% of the window in the left side of the page,
and two rows, the first 40% of the
window on the left side of the page.
<frameset cols="30%,70%">
<frame src="1.html">
<frameset rows="40%,*">
<frame src="2.html">
<frame src="3.html">
</frameset>
</frameset>
Frame
The frame tag(<frame src="url">)
tells a browser where to find a URL that it will be loading. This is the
same
tag that you see in the examples above.
The NAME modifier gives a identity to the frame. The purpose of doing this
is to allow links(a url) to load in
other frames on the same page. This is done by adding the target="name_of_frame"
to the link you want to load
in a different frame. Heres a example:
<frameset rows="10%,90%">
<frame src="1.html" name="A">
<frame src="2.html' name="B">
</frameset>
And the link would be done like this. Say you
put your links in the top frame which is named A. And you want the
link to load in the bottom frame(B).
<a herf="whatever.html" target="B">Main Menu</A>
NoFrames
Anything you put inside the noframes tag will
be ignored by browsers that support frames but, browsers that don't
support frames whatever is inside the noframes tag will be shown. Don't
let confuse you. This doesn't mean that
browsers that don't support frames will see frames. It means if the browser
dosen't support frames the message that
you put inside the noframes tag will be displayed to them. Example:
<noframes>
If you can see this, you browser dose not support frames get a <a herf="http://www.netscape.com">New
Browser
</noframes>
Other Neat Stuff
Margins
Lets say that you want some space between the
border of the screen and your web page document. You can do
this by using the marginwidth and marginheigth tags. e.g.
<frame src="whatever.html" marginwidth=60 marginheigth=60>
Or just whatever you want them to be.
Scrolling
Heres a nifty option. and example that you can
see in action is the top frame on my page. You will notice that there
is no scroll bar in that frame. I turned it off because there's nothing
below those links. Heres what you can do with the
scroll bar. You can turn it off, on, or auto(auto is the default setting).
Off <frame src="1.html"
scrolling=no>
On <frame src="1.html" scrolling=yes>
Auto <frame src="1.html" scrolling=auto>
NoResize
Noresize will not allow anyone to drag a frame to a different size. Example:
<frame src="1.html" noresize>
Hiding The Frame Borders
If you want you can hid the frame borders by doing this.
<frame src="1.html" frameborder=no>
<frame src="1.html" frameborder=yes>
NOTE:In order for a frame border to be hidden
all adjacent borders must be set to no. And the default of frameborder
in Netscape is Yes, in Internet Explorer it's No.
Border Sizing
You also can choose how thick you want your frames
border to be. By setting the border size to 0 the border is
automatically hidden. Heres what to do:
<frameset rows="10%,*" border=0>
NOTE:Netscape supports this option but I don't know what else dose. Also this option works will columns too.
Border Color
It just keeps getting better and better. You can
set the bordercolor of the frame. You can place this in either the
frame or frameset tag. The value is a RBG color of the border.
<frame src="1.html" bordercolor="#ff0000">
<frameset rows="70%,30%" bordercolor="#ff0000">
Red=FF0000
Green=00FF00
Blue=0000FF
Purple=FF00FF
Yellow=FFFF00
White=FFFFFF
Black=000000
NOTE:When two frames have different border colors
and share and edge Netscape will give an attribute
error message. And one other thing those are zeros(0) not the letter O.
Any questions send me some mail and I will try
to answer your questions. Just click the E-mail image on the
main page and send me a question or comment.