To Temple College Class  logo R. Craig Collins > Web Page Design > Instructor Notes: Tutorial 5

Instructor Notes: Tutorial 5 © R. Craig Collins, 2005/6

As I have separate 'lecture' material on most of these topics, I will try to avoid duplicating information; but I still want to comment on some of the content :)

Before I begin, let me just say that I dislike frames. Frames allow you to open multiple pages within the same browser space. While perhaps useful for search engines to display a search result, but still have you in a Google or Ask browser window, well that can be helpful; or, you may wish to display navigational tools that always stay at the top or the side of a page.

But often frames fail to load all of your desired pages, and trying to get a link to open in a separate frame, or just getting out of frames, can be a challenge. Editors either avoid or dare you to use them. DreamWeaver will insist on creating a new page for each frame, instead of asking first if you would like to use an existing page. And the second you click into one of those new pages within the frames, it is almost impossible to get DreamWeaver back to the frame, instead of the framed pages. And DreamWeaver will probably lock your windows and/or prevent resizing or scrolling, depending on what design you start with.

You might also note that the doctype is different, meaning while supported, I don't think the W3C likes them anymore than I do.

Iframe is clever, where you display another page as you would an image, but I rarely use it.

So, I took the time to create some templates, including some optional attributes, and I just start with those... when I need a frame.

Session 1

One of the things that crack me up about frames is they don't trust your math. If you want to create a frame the has two column, one 20% and one 80%, you simply define it as cols="20%,*"
... the * meaning 'what ever is left, after I subtract 20%.'

Note: If you remove scroll bars, scrolling="no", folks with small displays migh not be able to see your entire content area.

Session 2

Frames should be named, so you can open other documents in that frame.

Recall our earlier discussion on target= for a href? Now it really has its use.

<a href="somepage.htm">Click here</a> is the same as
<a href="somepage.htm" target="_self">Click here</a>;
that is, the linked document opens in the current browser window.

<a href="somepage.htm" target="_blank">Click here</a>;
means the linked document opens in a new browser window.

But, if you have frames you can have the link in one frame, but have the link open in a different frame.

Example:

this is index

to résumé

to page2

this is page1

If the frame on the left is named 'left', and the frame on the right is named 'right',
from the index we can:

<a href="resume.htm" target="right">to résumé</a>;
which means the linked document opens in a right frame

or we could
<a href="page2.htm" target="_self">to résumé</a>;
which means the linked document opens in a left frame,
which would be the equivalent of
<a href="page2.htm" target="left">to résumé</a>;

or we could
<a href="page2.htm" target="_top">to résumé</a>;
which means the linked document removes the frame set, and the résumé opens all by itself.

Not all browsers like frames, so you can take advantage of browsers ignoring tags they don't understand, to add <noframes></noframes> after your frame code. Since a browser would ignore the frame code, and the noframes tag, it basically displays what ever is left, such as a message to get a better browser. If your browser likes frames, it knows to ignore what ever is between the noframes tags.

Inline Frames again, are displaying a web pages as you would an image... carve a little box, then cram the image, or the page, into the box.

Session 3

There is none, but I would have made Tips for Using Frames the final section all by itself; but they should have also included other ways to accomplish what a frame is trying to provide :)