Kamis, 13 Desember 2012

Using Frames (I)

We are going to see what Frames are and when they must be used. We will also see how to insert a simple frame into a website and how to work with it.

Introduction
 
Frames are used to distribute the data in a web site. They help to keep some parts straight such as they are, as the logotype and the browser bar, while the others can change.
In addition they usually improve the appearance.
Each page's frame has its own HTML file. For example, in the image on the right you can see a page with two frames. The left frame has the menu.htm file, and the right frame has the dogs.htm file.
To see the page this way, we have opened the browser's file frames.htm, which is the page that has grouped the frames.
It is possible to edit the frame's files from the page that containts the set of frames. This simplifies the work as it is easier to figure what the final page is going to look like.
This is something that you cannot do if you edit each framed file individualy.
Working with frames can be a bit complicated, and even more so in the begining. We are not going to go too much into the theme, and we will only look at some of the basic concepts with a few easy examples.

Creating frames
There are many ways of creating a frame. We will only learn one.
To create a frame, you first need to open a file. It can be new or an existing one.
After this, you need to go to the Insert menu, HTML, and Frames. Through this option you can select the type of frame you want to create.
We are going to look at the Left frame option.
If we click on Left, a new frame will be created in the left side of the current file.


As you can see in the image, there is a line splitting the document.
In this case we will have three files: the left one, the right one, and the one which has the set of frames. The right one is the file we had at the start. It is in the frame known as Main Frame.
To select the file that has the set of frames you have to click on the line that splits the frames. This is only possible in case of not having been previously saved.

In case of inserting a right frame instead of a left frame, the empty frame will be shown to the right of the original file.
In this image you can see an example of a right frame.
A right frame has been inserted over an existing file, menu.htm.
As in the previous case, we have three files: the left, the right, and the one which has the set of frames. In this case the file we had at the begining is the left one, while the previous was the right one. For this reason Main frame will be at the left.
Main frame is the frame that is always in the initial file, into which the rest of the frames have been inserted.

Tidak ada komentar:

Posting Komentar