I'll show you some basic examples of frames here.
If you want to get fancy, then do some experimenting on your own. Don't forget, you can always
View/Source on anybody's web page to see how they made their frames.
To make a page with frames you have to create an HTML file that has only the
code for the frames. The contents in the frames are from separate HTML files.
So, for example, if you wanted a page with 2 frames you would need 3 HTML files -
one for the frames code, and one for each of the frames. Let's start with
making a frames code. Here's a simple one: Now let's get into what these commands mean. FRAMESET tells the browser
that we're starting a frame page. The ROWS tells it that we've got rows, not
columns. Then you need to tell it how big you want the rows to be. (The total
should generally equal 100%, if not the browser will adapt it to fill 100% of the page.)
Note the % sign!
Next you have to tell it what you want in the frames
and what you want the frames to do. Since there are two frames we have to
give it two descriptions. Let's look at the first one: Now for the second frame: Now, don't forget to close the FRAMESET tag with
</FRAMESET> and of course close the document with
</HTML>. This ain't so bad is it?! Don't worry if
you're having a problem remembering all this. One good way is to make a "dummy"
frames.html and save it so you can refer to it whenever you're making one for
your site.
Let's get a little further into this. Have you ever been to a page on
someone's site where you couldn't get out of the frames? You click on a link
and it opens up in one of the little windows, but if your luck's running
bad it's a link to yet another frames page. When making these pages you have
to target a window for your links to come up in. This is where it becomes
important to name each frame. We need to go to a frames page
so I can show you what we're getting into.
This page hosted by
Get your own
Free Home Page
<HTML>
This code make a frames page like
this. I guess you noticed that there's nothing in the frames.
That's because there is no up.html or down.html. If you don't make the pages to put in
the frames that's what it's going to look like. Go ahead and view the source code for
the frames!
<HEAD>
<TITLE>Frames</TITLE>
</HEAD>
<FRAMESET ROWS="20%, 80%">
<FRAME SRC="up.html" SCROLLING=no NAME="up">
<FRAME SRC="down.html" SCROLLING=auto NAME="down">
</FRAMESET>
</HTML>
<FRAME SRC="up.html" SCROLLING=no NAME="up">
SRC is the source for that frame,
the HTML file that will be displayed there. SCROLLING tells the browser whether
or not it can scroll on that frame. Please make sure that all the stuff
in that frame is visable! I've been to so many pages that have something at the
bottom of a frame that isn't viewable because it's not scrollable. I'll show you
what I mean here. It's pretty aggravating isn't it?
Sometimes if you hide all the tools in your browser you can see what you're missing,
but who knows if there's more?! NAME is what you're going to name that frame. This is
important when you are referring to your frames. We'll get into this a little later.
For now, just remember to name them something that's easy to remember.
<FRAME SRC="down.html" SCROLLING=auto NAME="down">
This frame is going to show the file
down.html. However, it will be scrollable. There is going to be a lot of information
on that page, so we want people to be able to scroll through the whole document.
Therefore, we use the command auto. If there isn't enough information on that page for
someone to have to scroll, there won't be a scroll bar, so don't be alarmed if you don't
see one. The NAME of this second window is "down".
Next page
[ Main Page | Drink Menu | Bar fun | The Crimson Tide | The Magic City | HTML Help | Spam | S.H.U.T.U.P.! Web Ring ]