An element used to define an area within a frameset.
<html> <head> <title>An unseen page that defines frames</title> </head> <frameset frameborder="0" framespacing="0" border="0" rows="*"> <frameset frameborder="0" framespacing="0" border="0" cols="135,*"> ==>> <frame name="LeftSide" src="leftside.htm" scrolling="auto" marginheight="2" marginwidth="2"> ==>> <frame name="RightSide" src="rightside.htm" scrolling="auto" marginheight="5" marginwidth="5"> </frameset> <noframes size="+1"> <body> . . </body> </noframes> </frameset> </html>
I know this example is a little more than I normally provide but for me, the concept of frames was always a little intimidating. Once I figured it out, it was so obviously simple that I want to try to make it that way for you, too. I will probably repeat a lot of this same material on the frameset page just in case you never make it there.
One of the most important things you need to notice in this example is that the frameset elements are outside the body elements. And if I wanted to be really tacky I could have left out the noframes element and not had a body statement at all. So what, you say! Well, if you put in body statements (which are technically optional anyway) around the frameset then you'll get some unexpected results. Believe me, it happened to me.
This is the place that I had my first run-in with Microsoft Front Page. My original home page defined the frameset with one statement, showing both the row and column values. Everytime I brought the set into the editor it did strange things to the setup. It seemed to combine the two values and I ended up with the left side on the top and the right side on the bottom. I kept playing with the lines until we reached this happy compromise that I show in the example. The more I look at it the more sense it makes so I'm not quite as mad as I first was.
Well, enough about the general structure, let's look at the subject of this page, the frame element. Through the cols attribute of the second frameset element, I've defined two vertical areas on my page - the left one is 135 pixels wide, not subject to negotiation, and the right side gets whatever space remains. Now, using my two frame statements, I give the browser some particulars about how to treat these two areas. The first thing I do is give them names - LeftSide and RightSide. Real original right? This is so I can name these areas in later hyperlinks as targets for the display of pages.
The next thing I do is tell it which pages to initially load into these areas when the base page is loaded. I've kept my creative juices flowing and came up with leftside.htm and rightside.htm.
Now, I get to define some of the appearance stuff. This was really important to me because I wanted to achieve a "frameless" look with the stuff on the left magically staying still while you scrolled the stuff on the right. My plan is to keep the left side short enough that it won't fall into the scrolling mode and bring up those ugly slider bars! That's why I set the size to 135 pixels wide also. Anyway, I set scrolling to auto so the browser can decide for itself whether to use slider bars. On the left side I put a 2 pixel margin around all sides of the page and on the right I put a 5 pixel margin all around.
I haven't played with more than 2 frames on a page. I think it kind of clutters up the screen a little bit and it can make it hard for the viewer to navigate around.
Not a peep.
They were first to bring out these elements. The frame attributes are:
Nothing to add.
Nothing special.
The Rusk Family . . . "the Legend
Continues"
All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.
Revised: December 03, 1997 10:40 -0500
URL: ./htmlgd/tagframe.html