Training

Frames for your Windows

Frames are all over the web. The problem is that you don't see them. They're like ghosts and spirits - just because they may be transparent to you - doesn't mean they don't exist. However, be warned that not all browsers see frames the same way.

But what exactly are frames?

Well - they're frames! Y'know, just like you put a frame around a picture? You can put a frame around an award, or something else. Frames are kinda like that. You put an HTML frame around something like a picture, or another web page or ....

The heck with the explaination already, let's just play with one and see what happens. Let's start with a simple one.

If you look at this page, it is actually divided into 2 sections. I purposely made the two sections easy to see, but quite commonly, they are not so easy to tell apart. They are often made so it appears to be just one big happy page. On many web pages out there, you will see the left side of the page is a list of links in one frame, and the right side is the main text, ads, graphs, photos and other information.

The html code that made all this happen looks like this:

Let me break that down into smaller bites.

What is actually happening here is this:

We have 2 web pages, one called html17a.htm, and the other called html17b.htm. We are opening one big page, subdivided into 2 "sub" pages, each sub page contained in a FRAME. The tag we use to create this is < FRAMESET > . The FRAMESET tag can be used to generate a page with either multiple columns or multiple rows. In this case we generated columns, but we could just as easily have created rows by saying
< FRAMESET ROWS = "..." > .

Within first tag is < FRAMESET COLS = "15%, 85%" > , we have 2 percentage numbers separated by a comma. This tells the page that we want two columns, the first of which takes up 15% of the page on the left side, and the second takes up 85% of the page on the right side.
( 15% + 85% = 100% .... Just thought you might want to know ).

Of course we could have 3, 4, or 40 columns, but there wouldn't be many practical applications for this. Usually 2 or 3 is all you'll have a need for. The percentages are a matter of taste, and can be configured either as a percentage, or as a fixed pixel size. Some folks use the left column as a fixed pixel size, and the right column as the wildcard * . By doing this, it assures that the left side of the page never changes it's width, but the right side can extend to accomodate for different screen settings. For example, if you wanted the left side of the page to be 100 pixels wide to accomodate for a picture, but wanted the page to look similar in many screen formats, you might try a frame setup like follows:

< FRAMESET COLS = " 100 , * " >

Two of the main Sub-commands of the FRAMESET tag are frameborder, and framespacing. Usable values for both are 0 - 10. Both are fairly self explanitory, and a little toying around with both will teach you far more by trial and error than I could ever express in words.

Inside the FRAMESET tags is another set of tags labled < FRAME >. This tag points to the source address SRC of the page that we want within the frame. Note that we must have one FRAME tag for every frame within the frameset. So if we have a page with 3 rows, we must have 3 percentages in the FRAMESET tag, and 3 FRAME tags beneath it as follows:
Scrolling is the little bar you can grab if the page is bigger than the window frame you have to put it on. It lets you move around the page. Border is pretty self explanitory, but if you have a question about it, play with it's value ( 0 - 10 ), and see what happens.

PAY ATTENTION HERE:

One of the "drawbacks" of frames is that from this point on, you will be STUCK in frames mode unless you:
  1. Hit the BACK BUTTON on your browser
  2. Click on page 17 from page 15
The above instructions are the preferred and best methods for viewing the remainder of the course.
On The Following Indicator...
( GREEN will indicate your current location)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

[ COURSE INDEX ] [ HTML GLOSSARY ] [ HOME ]


Otherwise - please click to visit an advertiser so they know you saw their ad!



This Course was written by Ray Dall © All Rights Reserved.
This page and all its content Copyright, Trademarks, Intellectual Properties
and other legal issues 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Ray Dall.
All Rights Reserved.
And for what it's worth... this page was last updated HexDate 01-11--7D1

VISITORS:
Add Me!