the complete webmaster
tutorials reviews reference
ASP
CGI
FrontPage
HTML
Java
JavaScript

home / articles / html

The Wonderful World of Frames.

Frames are another popular way of controlling the layout of your HTML pages. Frames are not as backwards compatible as tables are and they are not made to do all the things that tables do though. Never the less frames are an easy and effective way for you to break your page into sections.

Setting your Frames

Frames are controlled by an page which tells the browser where to divide the page and what other HTML documents to put into the divisions. The index page uses the < frameset > tag to declare the divisions in rows and columns. The rows and columns can be specified in pixel or percent format, be aware the percents of a page will vary depending on the users monitor and browser window size… so if you use pixels then it will make your page look the way you design it to now matter what. Always use the <noframes> tags for those browsers without frames support.

Beware the links

You must also name your frame with the name option so you can refer to it with hyper references. Otherwise your frame will pull up the link you click on in the frame that the link is in. Then you must add the target option into all of your hyper references and target them into their destination frame. You can also use the target frame to create a new browser window with target="_blank" or you can get it to clear the frames in the current window with target="_top".

Misc. Options

Frames have three more noteworthy option: border, scrolling, noresize. Border is a pixel value of the border width between frames. Scrolling controls the scrollbar and has 3 settings: YES, NO, and AUTO. I would use auto otherwise people with small browser windows will have no way of veiwing entire pages. The no resize option does just that, It makes your frames impossible for the user to resize.

A Working Demonstration

Click Here to veiw a working demonstration with links to the source code.

Author: Rich Stock
Date: [10/5/97]

More articles about HTML
More articles by Rich Stock
Author Biography

write for us about us advertise

Copyright 1997, 1998 A Big Lime. All rights reserved.

dy>