Frames

Every site on the internet is a Web page. Although there are many Web pages out on the internet, many don't get visited because they are hard to navigate through. Think of how many sites you have encountered that you end up leaving because you can't find the thing you went there for. That's why you see many sites that have menus that move with you as you go from page to page. These are created in frames.

Frames are created in a separate Web page than the menu and the main page. Frames take the place of the <BODY> tag, meaning you can't use these tags at the same time in the same document. To understand what we mean, click here. The portion on the left is the menu that has links which, once clicked, open the page they're linked to in the right portion. Notice that you never lose the menu and you can always go back to the page of your choice in one click. This is achieved by using the TARGET property. You access the frame by targeting the frame name. For example, if your main viewing frame is named "main", then you would use the target TARGET=main after the HREF="..." value. And, if you want to see more of the Web site you are looking up, you can move the bar that separates each portion by placing your mouse arrow over the bar until it becomes a double arrow. However, you can avoid allowing users to do this by adding NORESIZE to the <FRAME SRC> tag. You can also center things inside your frames by setting the MARGINHEIGHT and MARGINWIDTH within the same tags. Within the first <FRAMESET> tag, you can eliminate the borders of the frames by entering the property BORDER=0.

Another concept that recent web sites are using is the floating frame. You can achieve this by typing the tag <IFRAME WIDTH=350 HEIGHT=220 ALIGN=RIGHT HSPACE=5 SRC="my_frame.htm"> and end it with the tag </IFRAME>. As you can see to the right, we left the background color white so you could distinguish the main page from the floating page. Note that the floating page doesn't carry the same attributes as the main page because it is a separate page. If you want the pages to remain the same, which defeats the purpose of having a floating frame, you need to add the properties to the <BODY> of the inserted page or use the same style sheet source. This frame, like others that you create, will have a scrollbar if the page gets too long, unless you add the attributes that will not allow scrolling. This is good if you have more than one page on the same subject.

To see what you can do once you've gotten good at creating your own graphics and working with frames, click here. The top with the curve is a graphic in one frame and the psuedo-links on the side and the description in the white area are another. You can make the white space a third frame where the links display their information. To see a frame operate as a business site, click here. To see another business site, click here.


Previous | Home | No Next Yet

If you have a question about any of the lessons, feel free to ask.

1