FramesWell, I will show you how to make a basic frame first. This is a frame page with a main page and a menu page on the left side. Once you learn the basics about frames, you can customize your own, since they all work in similar ways. To make a web site using frames you will first need to create an index.html (or whatever extension) page with the following: <html> <head> <title>Your Page Title</title> </head> <frameset cols="20%,80%"> <frame src="left.html" name="leftside"> <frame src="right.html" name="rightside"> </frameset> <body> </body> <noframes> <a href="your main page.html">Click Here</a> </noframes> </html>
As you can see, it's really simple if you read the code. So first it tells the browser that
there are frames with the frameset. Then the cols which are the columns, one column is
20% of the page while the other is 80%. 20% is obviously the menu, 80% is the content. You
can also use pixelx (200px, 800px) measurements instead of percentages. If you just want to
use a percentage or pixel for one of your frames, or more and want the last one to be whatever
is left, just use a * in replacement for the percentage or pixel of the last frame.
<frameset cols="20%,*">
So then the first fame is called leftside and the file that the browser should import for the page is left.html located in the base directory. The 80% is the page name right.html and the name of that page is rightside. The names are used for link targeting. So when you have a link, you would target that link to the frame you want with the name. Example, say I have a link on the leftside, but I want that link to open a page in rightside. I would use target="rightside". And the link would open the page in the rightside frame. So, the last part is the noframes. It tells the broswer that if it doesn't support frams, show this instead. In the above example, it shows a link to your main page. This is the index page, then you need a left.html page and right.html page because if you don't have those pages, then you won't be able to see anything but error pages. |